diff --git a/tests/unit/data/ar/CustomerQuery.php b/tests/unit/data/ar/CustomerQuery.php index 89b9c9c93b..6b1013452b 100644 --- a/tests/unit/data/ar/CustomerQuery.php +++ b/tests/unit/data/ar/CustomerQuery.php @@ -7,9 +7,10 @@ use yii\db\ActiveQuery; */ class CustomerQuery extends ActiveQuery { - public static function active($query) + public function active() { - $query->andWhere('status=1'); + $this->andWhere('status=1'); + return $this; } } \ No newline at end of file diff --git a/tests/unit/data/ar/mongodb/CustomerQuery.php b/tests/unit/data/ar/mongodb/CustomerQuery.php index 009b7b2db8..bf222b6d3d 100644 --- a/tests/unit/data/ar/mongodb/CustomerQuery.php +++ b/tests/unit/data/ar/mongodb/CustomerQuery.php @@ -7,9 +7,10 @@ use yii\mongodb\ActiveQuery; */ class CustomerQuery extends ActiveQuery { - public static function activeOnly($query) + public function activeOnly() { - $query->andWhere(['status' => 2]); + $this->andWhere(['status' => 2]); + return $this; } } \ No newline at end of file diff --git a/tests/unit/data/ar/sphinx/ArticleIndexQuery.php b/tests/unit/data/ar/sphinx/ArticleIndexQuery.php index 19da67494b..f5843f001d 100644 --- a/tests/unit/data/ar/sphinx/ArticleIndexQuery.php +++ b/tests/unit/data/ar/sphinx/ArticleIndexQuery.php @@ -7,9 +7,10 @@ use yii\sphinx\ActiveQuery; */ class ArticleIndexQuery extends ActiveQuery { - public static function favoriteAuthor($query) + public function favoriteAuthor() { - $query->andWhere('author_id=1'); + $this->andWhere('author_id=1'); + return $this; } } \ No newline at end of file