the whole shebang

This commit is contained in:
daniel committed 2014-11-25 16:42:40 +01:00
1 parent 7f74c0613e
commit ab1334c0cf
3686 files changed
+496409 -1

No files matched your search

@@ -0,0 +1,29 @@
<?php
class PasswordVerifyTest extends PHPUnit_Framework_TestCase {
public function testFuncExists() {
$this->assertTrue(function_exists('password_verify'));
}
public function testFailedType() {
$this->assertFalse(password_verify(123, 123));
}
public function testSaltOnly() {
$this->assertFalse(password_verify('foo', '$2a$07$usesomesillystringforsalt$'));
}
public function testInvalidPassword() {
$this->assertFalse(password_verify('rasmusler', '$2a$07$usesomesillystringfore2uDLvp1Ii2e./U9C8sBjqp8I90dH6hi'));
}
public function testValidPassword() {
$this->assertTrue(password_verify('rasmuslerdorf', '$2a$07$usesomesillystringfore2uDLvp1Ii2e./U9C8sBjqp8I90dH6hi'));
}
public function testInValidHash() {
$this->assertFalse(password_verify('rasmuslerdorf', '$2a$07$usesomesillystringfore2uDLvp1Ii2e./U9C8sBjqp8I90dH6hj'));
}
}