diff options
author | Frédéric Guillot <fred@kanboard.net> | 2014-11-06 06:57:39 -0500 |
---|---|---|
committer | Frédéric Guillot <fred@kanboard.net> | 2014-11-06 06:57:39 -0500 |
commit | 420d0ca4dd6cf075204867de28c2e6d5b1b68184 (patch) | |
tree | e7723f4b0687d82300ca5b4d38e3ab0ff3fc13cf /vendor/ircmaxell/password-compat/test | |
parent | cfe1e13d4a2b964c950b5e3daa8cafab207f1158 (diff) |
Remove vendor again
Diffstat (limited to 'vendor/ircmaxell/password-compat/test')
4 files changed, 0 insertions, 165 deletions
diff --git a/vendor/ircmaxell/password-compat/test/Unit/PasswordGetInfoTest.php b/vendor/ircmaxell/password-compat/test/Unit/PasswordGetInfoTest.php deleted file mode 100644 index 6aab976a..00000000 --- a/vendor/ircmaxell/password-compat/test/Unit/PasswordGetInfoTest.php +++ /dev/null @@ -1,26 +0,0 @@ -<?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)); - } - -}
\ No newline at end of file diff --git a/vendor/ircmaxell/password-compat/test/Unit/PasswordHashTest.php b/vendor/ircmaxell/password-compat/test/Unit/PasswordHashTest.php deleted file mode 100644 index 9e5e9ec6..00000000 --- a/vendor/ircmaxell/password-compat/test/Unit/PasswordHashTest.php +++ /dev/null @@ -1,84 +0,0 @@ -<?php - -class PasswordHashTest extends PHPUnit_Framework_TestCase { - - public function testFuncExists() { - $this->assertTrue(function_exists('password_hash')); - } - - public function testStringLength() { - $this->assertEquals(60, strlen(password_hash('foo', PASSWORD_BCRYPT))); - } - - public function testHash() { - $hash = password_hash('foo', PASSWORD_BCRYPT); - $this->assertEquals($hash, crypt('foo', $hash)); - } - - public function testKnownSalt() { - $hash = password_hash("rasmuslerdorf", PASSWORD_BCRYPT, array("cost" => 7, "salt" => "usesomesillystringforsalt")); - $this->assertEquals('$2y$07$usesomesillystringfore2uDLvp1Ii2e./U9C8sBjqp8I90dH6hi', $hash); - } - - public function testRawSalt() { - $hash = password_hash("test", PASSWORD_BCRYPT, array("salt" => "123456789012345678901" . chr(0))); - $this->assertEquals('$2y$10$MTIzNDU2Nzg5MDEyMzQ1Nej0NmcAWSLR.oP7XOR9HD/vjUuOj100y', $hash); - } - - /** - * @expectedException PHPUnit_Framework_Error - */ - public function testInvalidAlgo() { - password_hash('foo', array()); - } - - /** - * @expectedException PHPUnit_Framework_Error - */ - public function testInvalidAlgo2() { - password_hash('foo', 2); - } - - /** - * @expectedException PHPUnit_Framework_Error - */ - public function testInvalidPassword() { - password_hash(array(), 1); - } - - /** - * @expectedException PHPUnit_Framework_Error - */ - public function testInvalidSalt() { - password_hash('foo', PASSWORD_BCRYPT, array('salt' => array())); - } - - /** - * @expectedException PHPUnit_Framework_Error - */ - public function testInvalidBcryptCostLow() { - password_hash('foo', PASSWORD_BCRYPT, array('cost' => 3)); - } - - /** - * @expectedException PHPUnit_Framework_Error - */ - public function testInvalidBcryptCostHigh() { - password_hash('foo', PASSWORD_BCRYPT, array('cost' => 32)); - } - - /** - * @expectedException PHPUnit_Framework_Error - */ - public function testInvalidBcryptCostInvalid() { - password_hash('foo', PASSWORD_BCRYPT, array('cost' => 'foo')); - } - - /** - * @expectedException PHPUnit_Framework_Error - */ - public function testInvalidBcryptSaltShort() { - password_hash('foo', PASSWORD_BCRYPT, array('salt' => 'abc')); - } - -}
\ No newline at end of file diff --git a/vendor/ircmaxell/password-compat/test/Unit/PasswordNeedsRehashTest.php b/vendor/ircmaxell/password-compat/test/Unit/PasswordNeedsRehashTest.php deleted file mode 100644 index c2932dc6..00000000 --- a/vendor/ircmaxell/password-compat/test/Unit/PasswordNeedsRehashTest.php +++ /dev/null @@ -1,26 +0,0 @@ -<?php - -class PasswordNeedsRehashTest extends PHPUnit_Framework_TestCase { - - public static function provideCases() { - return array( - array('foo', 0, array(), false), - array('foo', 1, array(), true), - array('$2y$07$usesomesillystringfore2uDLvp1Ii2e./U9C8sBjqp8I90dH6hi', PASSWORD_BCRYPT, array(), true), - array('$2y$07$usesomesillystringfore2udlvp1ii2e./u9c8sbjqp8i90dh6hi', PASSWORD_BCRYPT, array('cost' => 7), false), - array('$2y$07$usesomesillystringfore2udlvp1ii2e./u9c8sbjqp8i90dh6hi', PASSWORD_BCRYPT, array('cost' => 5), true), - ); - } - - public function testFuncExists() { - $this->assertTrue(function_exists('password_needs_rehash')); - } - - /** - * @dataProvider provideCases - */ - public function testCases($hash, $algo, $options, $valid) { - $this->assertEquals($valid, password_needs_rehash($hash, $algo, $options)); - } - -}
\ No newline at end of file diff --git a/vendor/ircmaxell/password-compat/test/Unit/PasswordVerifyTest.php b/vendor/ircmaxell/password-compat/test/Unit/PasswordVerifyTest.php deleted file mode 100644 index 9f67bb9f..00000000 --- a/vendor/ircmaxell/password-compat/test/Unit/PasswordVerifyTest.php +++ /dev/null @@ -1,29 +0,0 @@ -<?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')); - } - -}
\ No newline at end of file |