Browse Source

Datetime tests in MySQL will return the time portion as well.

Use a less sensitive assertion here.
mark_story 12 years ago
parent
commit
dde6dffd9f
1 changed files with 1 additions and 1 deletions
  1. 1 1
      tests/TestCase/Database/QueryTest.php

+ 1 - 1
tests/TestCase/Database/QueryTest.php

@@ -1843,7 +1843,7 @@ class QueryTest extends TestCase {
 		$query = new Query($this->connection);
 		$result = $query->select('created')->from('comments')->where(['id' => 1])->execute();
 		$result = $result->fetchAll('assoc')[0]['created'];
-		$this->assertEquals($date->format('Y-m-d'), $result);
+		$this->assertStringStartsWith($date->format('Y-m-d'), $result);
 	}
 
 /**