Browse Source

Fixed scope method signatures

tags/2.0.0-beta
Alexander Makarov 11 years ago
parent
commit
ed97632f53
  1. 5
      tests/unit/data/ar/CustomerQuery.php
  2. 5
      tests/unit/data/ar/mongodb/CustomerQuery.php
  3. 5
      tests/unit/data/ar/sphinx/ArticleIndexQuery.php

5
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;
}
}

5
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;
}
}

5
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;
}
}
Loading…
Cancel
Save