mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 11:06:15 +00:00
Fixing SQL errors when running model_behavior tests with postgresql. Fixes #406
This commit is contained in:
parent
bfbf31e234
commit
e6664f0ea4
1 changed files with 5 additions and 5 deletions
|
@ -786,16 +786,16 @@ class BehaviorTest extends CakeTestCase {
|
|||
'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);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue