From 7a9626af3bef5c712901597065745d9572c3f097 Mon Sep 17 00:00:00 2001 From: wei <> Date: Tue, 27 Feb 2007 23:48:49 +0000 Subject: BC: Deprecate TActiveRecord::getRecordFinder() in favour of TActiveRecord::finder(). --- tests/simple_unit/ActiveRecord/BaseActiveRecordTestCase.php | 9 ++++----- tests/simple_unit/ActiveRecord/records/Blogs.php | 7 +++---- tests/simple_unit/ActiveRecord/records/DepSections.php | 7 +++---- tests/simple_unit/ActiveRecord/records/DepartmentRecord.php | 7 +++---- tests/simple_unit/ActiveRecord/records/SimpleUser.php | 7 +++---- tests/simple_unit/ActiveRecord/records/SqliteUsers.php | 7 +++---- tests/simple_unit/ActiveRecord/records/UserRecord.php | 7 +++---- tests/simple_unit/SqlMap/ActiveRecordSqlMapTest.php | 4 ++-- 8 files changed, 24 insertions(+), 31 deletions(-) (limited to 'tests/simple_unit') diff --git a/tests/simple_unit/ActiveRecord/BaseActiveRecordTestCase.php b/tests/simple_unit/ActiveRecord/BaseActiveRecordTestCase.php index 9e48fe5f..fbb1c927 100644 --- a/tests/simple_unit/ActiveRecord/BaseActiveRecordTestCase.php +++ b/tests/simple_unit/ActiveRecord/BaseActiveRecordTestCase.php @@ -1,5 +1,4 @@ -assertIdentical($obj1,$obj2); } function test_finder_throw_exception_when_save() { - $obj = TActiveRecord::getRecordFinder('BaseRecordTest'); + $obj = TActiveRecord::finder('BaseRecordTest'); try { $obj->save(); diff --git a/tests/simple_unit/ActiveRecord/records/Blogs.php b/tests/simple_unit/ActiveRecord/records/Blogs.php index 69bdecd9..c32ca6b6 100644 --- a/tests/simple_unit/ActiveRecord/records/Blogs.php +++ b/tests/simple_unit/ActiveRecord/records/Blogs.php @@ -1,14 +1,13 @@ -_level=TPropertyValue::ensureInteger($level); } - public static function finder() + public static function finder($className=__CLASS__) { - return self::getRecordFinder('UserRecord'); + return parent::finder($className); } } diff --git a/tests/simple_unit/SqlMap/ActiveRecordSqlMapTest.php b/tests/simple_unit/SqlMap/ActiveRecordSqlMapTest.php index 9dc944f5..1f018a02 100644 --- a/tests/simple_unit/SqlMap/ActiveRecordSqlMapTest.php +++ b/tests/simple_unit/SqlMap/ActiveRecordSqlMapTest.php @@ -16,9 +16,9 @@ class ActiveAccount extends TActiveRecord private static $_tablename='Accounts'; - public static function finder() + public static function finder($className=__CLASS__) { - return self::getRecordFinder('ActiveAccount'); + return parent::finder($className); } } -- cgit v1.2.3