Skip to content

Commit 2ee37ef

Browse files
committed
Fix test using orWhere().
1 parent bf25c4c commit 2ee37ef

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

tests/TestCase/ORM/TableTest.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -555,7 +555,14 @@ public function testFindAllConditionAutoTypes()
555555
];
556556
$this->assertSame($expected, $query->toArray());
557557

558-
$query->orWhere(['users.created' => new Time('2008-03-17 01:18:23')]);
558+
$query= $table->find()
559+
->enableHydration(false)
560+
->select(['id', 'username'])
561+
->where(['OR' => [
562+
'created >=' => new Time('2010-01-22 00:00'),
563+
'users.created' => new Time('2008-03-17 01:18:23')
564+
]])
565+
->order('id');
559566
$expected = [
560567
['id' => 2, 'username' => 'nate'],
561568
['id' => 3, 'username' => 'larry'],

0 commit comments

Comments
 (0)