Skip to content

Commit

Permalink
Migrating StringTest to phpunit
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzo committed May 19, 2010
1 parent 50021ee commit f1eaec1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cake/tests/cases/libs/string.test.php
Expand Up @@ -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);
}

Expand All @@ -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;
Expand Down

0 comments on commit f1eaec1

Please sign in to comment.