From e6664f0ea415ec67f5c4e869fec3fc1b6eddd493 Mon Sep 17 00:00:00 2001 From: Mark Story Date: Sun, 7 Mar 2010 19:02:19 -0500 Subject: [PATCH] Fixing SQL errors when running model_behavior tests with postgresql. Fixes #406 --- cake/tests/cases/libs/model/model_behavior.test.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/cake/tests/cases/libs/model/model_behavior.test.php b/cake/tests/cases/libs/model/model_behavior.test.php index bbfa6215e7e..95daf2ddb98 100644 --- a/cake/tests/cases/libs/model/model_behavior.test.php +++ b/cake/tests/cases/libs/model/model_behavior.test.php @@ -786,16 +786,16 @@ function testBehaviorBelongsToFindCallbacks() { 'Apple' => array('id' => 3), 'Parent' => array('id' => 2,'name' => 'Bright Red Apple', 'mytime' => '22:57:17')) ); - $result = $Apple->find('all', array('fields' => array('Apple.id', 'Parent.*'), 'conditions' => array('Apple.id <' => '4'))); - //$this->assertEqual($result, $expected2); + $result = $Apple->find('all', array( + 'fields' => array('Apple.id', 'Parent.id', 'Parent.name', 'Parent.mytime'), + 'conditions' => array('Apple.id <' => '4') + )); + $this->assertEqual($result, $expected2); $Apple->Parent->Behaviors->disable('Test'); $result = $Apple->find('all'); $this->assertEqual($result, $expected); - $Apple->Parent->Behaviors->attach('Test', array('before' => 'off', 'after' => 'on')); - //$this->assertIdentical($Apple->find('all'), array()); - $Apple->Parent->Behaviors->attach('Test', array('after' => 'off')); $this->assertEqual($Apple->find('all'), $expected);