Updating DboSource test to account for formatting of floats done in mysql/postgresql.

This commit is contained in:
mark_story 2010-08-26 21:20:13 -04:00
parent 95168cee6e
commit 123873b4d8

View file

@ -2548,11 +2548,11 @@ class DboSourceTest extends CakeTestCase {
$this->assertEqual($result, $expected); $this->assertEqual($result, $expected);
$result = $this->testDb->conditions(array('score BETWEEN ? AND ?' => array(90.1, 95.7))); $result = $this->testDb->conditions(array('score BETWEEN ? AND ?' => array(90.1, 95.7)));
$expected = " WHERE `score` BETWEEN 90.1 AND 95.7"; $expected = " WHERE `score` BETWEEN 90.100000 AND 95.700000";
$this->assertEqual($result, $expected); $this->assertEqual($result, $expected);
$result = $this->testDb->conditions(array('Post.title' => 1.1)); $result = $this->testDb->conditions(array('Post.title' => 1.1));
$expected = " WHERE `Post`.`title` = 1.1"; $expected = " WHERE `Post`.`title` = 1.100000";
$this->assertEqual($result, $expected); $this->assertEqual($result, $expected);
$result = $this->testDb->conditions(array('Post.title' => 1.1), true, true, new Post()); $result = $this->testDb->conditions(array('Post.title' => 1.1), true, true, new Post());