function testDeleteNullCondition() { $mock = $this->getMock('TikiDb'); $query = 'DELETE FROM `other_table` WHERE 1=1 AND `objectType` = ? AND `objectId` = ? AND (`lang` = ? OR `lang` IS NULL) LIMIT 1'; $mock->expects($this->once())->method('query')->with($this->equalTo($query), $this->equalTo(array('wiki page', 'HomePage', null))); $table = new TikiDb_Table($mock, 'other_table'); $table->delete(array('objectType' => 'wiki page', 'objectId' => 'HomePage', 'lang' => '')); }