the whole shebang

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

View File

@@ -0,0 +1,26 @@
<?php
class PasswordGetInfoTest extends PHPUnit_Framework_TestCase {
public static function provideInfo() {
return array(
array('foo', array('algo' => 0, 'algoName' => 'unknown', 'options' => array())),
array('$2y$', array('algo' => 0, 'algoName' => 'unknown', 'options' => array())),
array('$2y$07$usesomesillystringfore2uDLvp1Ii2e./U9C8sBjqp8I90dH6hi', array('algo' => PASSWORD_BCRYPT, 'algoName' => 'bcrypt', 'options' => array('cost' => 7))),
array('$2y$10$usesomesillystringfore2uDLvp1Ii2e./U9C8sBjqp8I90dH6hi', array('algo' => PASSWORD_BCRYPT, 'algoName' => 'bcrypt', 'options' => array('cost' => 10))),
);
}
public function testFuncExists() {
$this->assertTrue(function_exists('password_get_info'));
}
/**
* @dataProvider provideInfo
*/
public function testInfo($hash, $info) {
$this->assertEquals($info, password_get_info($hash));
}
}