Exemplo n.º 1
0
 public function testFilterWhere()
 {
     // should work with hash format
     $query = new Query();
     $query->filterWhere(['id' => 0, 'title' => '   ', 'author_ids' => []]);
     $this->assertEquals(['id' => 0], $query->where);
     $query->andFilterWhere(['status' => null]);
     $this->assertEquals(['id' => 0], $query->where);
     $query->orFilterWhere(['name' => '']);
     $this->assertEquals(['id' => 0], $query->where);
 }