From 903ae8a581fac1e6917fc3e31d2ad8fb91df80c3 Mon Sep 17 00:00:00 2001 From: ctrlaltca <> Date: Thu, 12 Jul 2012 11:21:01 +0000 Subject: standardize the use of unix eol; use svn properties to enforce native eol --- .../simple_unit/ActiveRecord/CriteriaTestCase.php | 98 +++++++++++----------- 1 file changed, 49 insertions(+), 49 deletions(-) (limited to 'tests/simple_unit/ActiveRecord/CriteriaTestCase.php') diff --git a/tests/simple_unit/ActiveRecord/CriteriaTestCase.php b/tests/simple_unit/ActiveRecord/CriteriaTestCase.php index 17f691d7..de5b3b71 100644 --- a/tests/simple_unit/ActiveRecord/CriteriaTestCase.php +++ b/tests/simple_unit/ActiveRecord/CriteriaTestCase.php @@ -1,50 +1,50 @@ -setDbConnection($conn); - } - - function test_orderby_only() - { - $criteria = new TActiveRecordCriteria; - $criteria->OrdersBy['name'] = 'asc'; - $records = DepartmentRecord::finder()->findAll($criteria); - $this->assertEqual(count($records), 8); - $this->assertEqual($records[0]->name, '+GX Service'); - $this->assertEqual($records[7]->name, 'Marketing'); - } - - function test_orderby_only_desc() - { - $criteria = new TActiveRecordCriteria; - $criteria->OrdersBy['name'] = 'desc'; - $records = DepartmentRecord::finder()->findAll($criteria); - $this->assertEqual(count($records), 8); - $this->assertEqual($records[7]->name, '+GX Service'); - $this->assertEqual($records[0]->name, 'Marketing'); - } - - function test_criteria_parameters() - { - $criteria = new TActiveRecordCriteria('sql', "One", "two", 3); - $expect = array("One", "two", 3); - $this->assertEqual($criteria->getParameters()->toArray(), $expect); - } - - function test_criteria_parameters_array() - { - $expect = array("One", "two", 3); - $criteria = new TActiveRecordCriteria('sql', $expect); - $this->assertEqual($criteria->getParameters()->toArray(), $expect); - } -} - +setDbConnection($conn); + } + + function test_orderby_only() + { + $criteria = new TActiveRecordCriteria; + $criteria->OrdersBy['name'] = 'asc'; + $records = DepartmentRecord::finder()->findAll($criteria); + $this->assertEqual(count($records), 8); + $this->assertEqual($records[0]->name, '+GX Service'); + $this->assertEqual($records[7]->name, 'Marketing'); + } + + function test_orderby_only_desc() + { + $criteria = new TActiveRecordCriteria; + $criteria->OrdersBy['name'] = 'desc'; + $records = DepartmentRecord::finder()->findAll($criteria); + $this->assertEqual(count($records), 8); + $this->assertEqual($records[7]->name, '+GX Service'); + $this->assertEqual($records[0]->name, 'Marketing'); + } + + function test_criteria_parameters() + { + $criteria = new TActiveRecordCriteria('sql', "One", "two", 3); + $expect = array("One", "two", 3); + $this->assertEqual($criteria->getParameters()->toArray(), $expect); + } + + function test_criteria_parameters_array() + { + $expect = array("One", "two", 3); + $criteria = new TActiveRecordCriteria('sql', $expect); + $this->assertEqual($criteria->getParameters()->toArray(), $expect); + } +} + ?> \ No newline at end of file -- cgit v1.2.3