File modules/security/test/PasswordTest.class.php
Last commit: Thu Sep 10 23:46:04 2020 +0200 Jan Dankert New: Simple Unit-Testing.
1 <?php 2 3 namespace security\test; 4 5 use security\Password; 6 use util\test\TestCase; 7 8 class PasswordTest extends TestCase { 9 10 public function testHash() { 11 $this->assertEquals("aadce520e20c2899f4ced228a79a3083",Password::hash("wtf",Password::ALGO_MD5)); 12 } 13 14 15 public function testCheck() { 16 17 $this->assertEquals( true, Password::check("wtf",'$2y$10$LNY2qCb9elkMe/ITN09cB.6t5QqDzm9Uh9h/LV1I',Password::ALGO_CRYPT) ); 18 19 $this->assertEquals( true,Password::check("wtf",'aadce520e20c2899f4ced228a79a3083',Password::ALGO_MD5)); 20 } 21 }
Downloadmodules/security/test/PasswordTest.class.php
History Thu, 10 Sep 2020 23:46:04 +0200 Jan Dankert New: Simple Unit-Testing.