summaryrefslogtreecommitdiff
path: root/tests/simple_unit/ActiveRecord/FindByPksTestCase.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/simple_unit/ActiveRecord/FindByPksTestCase.php')
-rw-r--r--tests/simple_unit/ActiveRecord/FindByPksTestCase.php10
1 files changed, 8 insertions, 2 deletions
diff --git a/tests/simple_unit/ActiveRecord/FindByPksTestCase.php b/tests/simple_unit/ActiveRecord/FindByPksTestCase.php
index e7f3e3d0..e3ba0358 100644
--- a/tests/simple_unit/ActiveRecord/FindByPksTestCase.php
+++ b/tests/simple_unit/ActiveRecord/FindByPksTestCase.php
@@ -1,5 +1,4 @@
-<?php
-
+<?php
Prado::using('System.Data.ActiveRecord.TActiveRecord');
require_once(dirname(__FILE__).'/records/DepartmentRecord.php');
require_once(dirname(__FILE__).'/records/DepSections.php');
@@ -19,6 +18,13 @@ class FindByPksTestCase extends UnitTestCase
$this->assertEqual($dep->department_id, 1);
}
+ function test_find_by_1pk_array()
+ {
+ $dep = DepartmentRecord::finder()->findByPk(array(1));
+ $this->assertNotNull($dep);
+ $this->assertEqual($dep->department_id, 1);
+ }
+
function test_find_by_pks()
{
$deps = DepartmentRecord::finder()->findAllByPks(1,2,4);