Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixing SQL errors when running model_behavior tests with postgresql. …

…Fixes #406
  • Loading branch information...
commit e6664f0ea415ec67f5c4e869fec3fc1b6eddd493 1 parent bfbf31e
@markstory markstory authored
Showing with 5 additions and 5 deletions.
  1. +5 −5 cake/tests/cases/libs/model/model_behavior.test.php
View
10 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);

0 comments on commit e6664f0

Please sign in to comment.
Something went wrong with that request. Please try again.