Skip to content

Commit

Permalink
Fix a couple of failing tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
bar committed Nov 12, 2013
1 parent dcadfcb commit 64f34b7
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions lib/Cake/Test/Case/Model/Datasource/Database/MysqlTest.php
Expand Up @@ -1981,8 +1981,9 @@ public function testStringConditionsParsing() {
$expected = " WHERE SUM(`Post`.`comments_count`) > 500";
$this->assertEquals($expected, $result);

$result = $this->Dbo->conditions("(Post.created < '" . date('Y-m-d H:i') . "') GROUP BY YEAR(Post.created), MONTH(Post.created)");
$expected = " WHERE (`Post`.`created` < '" . date('Y-m-d H:i') . "') GROUP BY YEAR(`Post`.`created`), MONTH(`Post`.`created`)";
$date = date('Y-m-d H:i');
$result = $this->Dbo->conditions("(Post.created < '" . $date . "') GROUP BY YEAR(Post.created), MONTH(Post.created)");
$expected = " WHERE (`Post`.`created` < '" . $date . "') GROUP BY YEAR(`Post`.`created`), MONTH(`Post`.`created`)";
$this->assertEquals($expected, $result);

$result = $this->Dbo->conditions("score BETWEEN 90.1 AND 95.7");
Expand All @@ -1997,8 +1998,9 @@ public function testStringConditionsParsing() {
$expected = " WHERE `Aro`.`rght` = `Aro`.`lft` + 1.1";
$this->assertEquals($expected, $result);

$result = $this->Dbo->conditions("(Post.created < '" . date('Y-m-d H:i:s') . "') GROUP BY YEAR(Post.created), MONTH(Post.created)");
$expected = " WHERE (`Post`.`created` < '" . date('Y-m-d H:i:s') . "') GROUP BY YEAR(`Post`.`created`), MONTH(`Post`.`created`)";
$date = date('Y-m-d H:i:s');
$result = $this->Dbo->conditions("(Post.created < '" . $date . "') GROUP BY YEAR(Post.created), MONTH(Post.created)");
$expected = " WHERE (`Post`.`created` < '" . $date . "') GROUP BY YEAR(`Post`.`created`), MONTH(`Post`.`created`)";
$this->assertEquals($expected, $result);

$result = $this->Dbo->conditions('Sportstaette.sportstaette LIKE "%ru%" AND Sportstaette.sportstaettenart_id = 2');
Expand Down

0 comments on commit 64f34b7

Please sign in to comment.