Migrating SecurityTest to phpunit

This commit is contained in:
José Lorenzo Rodríguez 2010-05-19 00:15:35 -04:30
parent bcc3321bd3
commit e60cc99034

View file

@ -143,12 +143,6 @@ class SecurityTest extends CakeTestCase {
$result = Security::cipher($txt, $key);
$this->assertEqual(Security::cipher($result, $key), $txt);
$txt = 'some_text';
$key = '';
$result = Security::cipher($txt, $key);
$this->assertError();
$this->assertIdentical($result, '');
$txt = 123456;
$key = 'my_key';
$result = Security::cipher($txt, $key);
@ -158,5 +152,10 @@ class SecurityTest extends CakeTestCase {
$key = 'my_key';
$result = Security::cipher($txt, $key);
$this->assertEqual(Security::cipher($result, $key), $txt);
$txt = 'some_text';
$key = '';
$this->expectError();
$result = Security::cipher($txt, $key);
}
}