From 85c0a3b355af7af38e32e86e344c347c52e69d98 Mon Sep 17 00:00:00 2001 From: Alexander Makarov Date: Tue, 10 Apr 2012 21:49:24 +0200 Subject: [PATCH] Fixed scope issue in tests --- tests/unit/data/ar/Customer.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/unit/data/ar/Customer.php b/tests/unit/data/ar/Customer.php index 4e8215e..eb8013a 100644 --- a/tests/unit/data/ar/Customer.php +++ b/tests/unit/data/ar/Customer.php @@ -23,9 +23,10 @@ class Customer extends ActiveRecord public static function scopes() { + $status = self::STATUS_ACTIVE; return array( - 'active' => function($q) { - return $q->andWhere('@.`status` = ' . self::STATUS_ACTIVE); + 'active' => function($q) use ($status){ + return $q->andWhere('@.`status` = ' . $status); }, ); }