mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 11:06:15 +00:00
Migrating SecurityTest to phpunit
This commit is contained in:
parent
bcc3321bd3
commit
e60cc99034
1 changed files with 6 additions and 7 deletions
|
@ -142,13 +142,7 @@ class SecurityTest extends CakeTestCase {
|
|||
$key = 'my_key';
|
||||
$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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue