[ Index ] |
PHP Cross Reference of moodle-2.8 |
[Summary view] [Print] [Text view]
1 <?php 2 3 global $CFG; 4 require_once($CFG->dirroot . '/lib/password_compat/lib/password.php'); 5 6 class PasswordGetInfoTest extends PHPUnit_Framework_TestCase { 7 8 public static function provideInfo() { 9 return array( 10 array('foo', array('algo' => 0, 'algoName' => 'unknown', 'options' => array())), 11 array('$2y$', array('algo' => 0, 'algoName' => 'unknown', 'options' => array())), 12 array('$2y$07$usesomesillystringfore2uDLvp1Ii2e./U9C8sBjqp8I90dH6hi', array('algo' => PASSWORD_BCRYPT, 'algoName' => 'bcrypt', 'options' => array('cost' => 7))), 13 array('$2y$10$usesomesillystringfore2uDLvp1Ii2e./U9C8sBjqp8I90dH6hi', array('algo' => PASSWORD_BCRYPT, 'algoName' => 'bcrypt', 'options' => array('cost' => 10))), 14 15 ); 16 } 17 18 public function testFuncExists() { 19 $this->assertTrue(function_exists('password_get_info')); 20 } 21 22 /** 23 * @dataProvider provideInfo 24 */ 25 public function testInfo($hash, $info) { 26 $this->assertEquals($info, password_get_info($hash)); 27 } 28 29 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Fri Nov 28 20:29:05 2014 | Cross-referenced by PHPXref 0.7.1 |