summaryrefslogtreecommitdiff
path: root/tests/simple_unit/ActiveRecord/CriteriaTestCase.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/simple_unit/ActiveRecord/CriteriaTestCase.php')
-rw-r--r--tests/simple_unit/ActiveRecord/CriteriaTestCase.php14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/simple_unit/ActiveRecord/CriteriaTestCase.php b/tests/simple_unit/ActiveRecord/CriteriaTestCase.php
index f1545e1d..17f691d7 100644
--- a/tests/simple_unit/ActiveRecord/CriteriaTestCase.php
+++ b/tests/simple_unit/ActiveRecord/CriteriaTestCase.php
@@ -31,6 +31,20 @@ class CriteriaTestCase extends UnitTestCase
$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