From f1eaec11f5f14111ee2d21b5f3c12a7dcbca2ea8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Lorenzo=20Rodr=C3=ADguez?= Date: Wed, 19 May 2010 00:05:49 -0430 Subject: [PATCH] Migrating StringTest to phpunit --- cake/tests/cases/libs/string.test.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cake/tests/cases/libs/string.test.php b/cake/tests/cases/libs/string.test.php index 20a6aa6ee99..6e36973876c 100644 --- a/cake/tests/cases/libs/string.test.php +++ b/cake/tests/cases/libs/string.test.php @@ -36,7 +36,7 @@ class StringTest extends CakeTestCase { function testUuidGeneration() { $result = String::uuid(); $pattern = "/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/"; - $match = preg_match($pattern, $result); + $match = (bool) preg_match($pattern, $result); $this->assertTrue($match); } @@ -53,7 +53,7 @@ function testMultipleUuidGeneration() { for($i = 0; $i < $count; $i++) { $result = String::uuid(); - $match = preg_match($pattern, $result); + $match = (bool) preg_match($pattern, $result); $this->assertTrue($match); $this->assertFalse(in_array($result, $check)); $check[] = $result;