Commit a6aaafd3 by Qiang Xue

Fixed test break.

parent 54e08f3f
...@@ -244,7 +244,7 @@ class ActiveRecordTest extends RedisTestCase ...@@ -244,7 +244,7 @@ class ActiveRecordTest extends RedisTestCase
public function testFilterWhere() public function testFilterWhere()
{ {
// should work with hash format // should work with hash format
$query = new ActiveQuery(); $query = new ActiveQuery('dummy');
$query->filterWhere([ $query->filterWhere([
'id' => 0, 'id' => 0,
'title' => ' ', 'title' => ' ',
...@@ -259,7 +259,7 @@ class ActiveRecordTest extends RedisTestCase ...@@ -259,7 +259,7 @@ class ActiveRecordTest extends RedisTestCase
$this->assertEquals(['id' => 0], $query->where); $this->assertEquals(['id' => 0], $query->where);
// should work with operator format // should work with operator format
$query = new ActiveQuery(); $query = new ActiveQuery('dummy');
$condition = ['like', 'name', 'Alex']; $condition = ['like', 'name', 'Alex'];
$query->filterWhere($condition); $query->filterWhere($condition);
$this->assertEquals($condition, $query->where); $this->assertEquals($condition, $query->where);
...@@ -294,7 +294,7 @@ class ActiveRecordTest extends RedisTestCase ...@@ -294,7 +294,7 @@ class ActiveRecordTest extends RedisTestCase
public function testFilterWhereRecursively() public function testFilterWhereRecursively()
{ {
$query = new ActiveQuery(); $query = new ActiveQuery('dummy');
$query->filterWhere(['and', ['like', 'name', ''], ['like', 'title', ''], ['id' => 1], ['not', ['like', 'name', '']]]); $query->filterWhere(['and', ['like', 'name', ''], ['like', 'title', ''], ['id' => 1], ['not', ['like', 'name', '']]]);
$this->assertEquals(['and', ['id' => 1]], $query->where); $this->assertEquals(['and', ['id' => 1]], $query->where);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment