Skip to content

Commit

Permalink
MINOR Fixed SQL quoting in DbDatetimeTest (broke PostgreSQL)
Browse files Browse the repository at this point in the history
  • Loading branch information
chillu committed May 30, 2011
1 parent e1931c1 commit 908eeb4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/model/DbDatetimeTest.php
Expand Up @@ -91,7 +91,7 @@ function testDbDatetimeInterval() {


$query = new SQLQuery(); $query = new SQLQuery();
$query->select($this->adapter->datetimeIntervalClause('"Created"', '-15 Minutes') . ' AS "test"') $query->select($this->adapter->datetimeIntervalClause('"Created"', '-15 Minutes') . ' AS "test"')
->from("DbDateTimeTest_Team") ->from('"DbDateTimeTest_Team"')
->limit(1); ->limit(1);
$result = $query->execute()->value(); $result = $query->execute()->value();
$this->matchesRoughly($result, date('Y-m-d H:i:s', strtotime(Dataobject::get_one('DbDateTimeTest_Team')->Created) - 900), '15 Minutes before creating fixture'); $this->matchesRoughly($result, date('Y-m-d H:i:s', strtotime(Dataobject::get_one('DbDateTimeTest_Team')->Created) - 900), '15 Minutes before creating fixture');
Expand All @@ -116,7 +116,7 @@ function testDbDatetimeDifference() {


$query = new SQLQuery(); $query = new SQLQuery();
$query->select($this->adapter->datetimeDifferenceClause('"LastEdited"', '"Created"') . ' AS "test"') $query->select($this->adapter->datetimeDifferenceClause('"LastEdited"', '"Created"') . ' AS "test"')
->from("DbDateTimeTest_Team") ->from('"DbDateTimeTest_Team"')
->limit(1); ->limit(1);


$result = $query->execute()->value(); $result = $query->execute()->value();
Expand Down

0 comments on commit 908eeb4

Please sign in to comment.