From e60cc990349741e6cf4c2821fe11607d66f3181c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Lorenzo=20Rodr=C3=ADguez?= Date: Wed, 19 May 2010 00:15:35 -0430 Subject: [PATCH] Migrating SecurityTest to phpunit --- cake/tests/cases/libs/security.test.php | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/cake/tests/cases/libs/security.test.php b/cake/tests/cases/libs/security.test.php index 8b9050704..3eeb76d38 100644 --- a/cake/tests/cases/libs/security.test.php +++ b/cake/tests/cases/libs/security.test.php @@ -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); } }