From a3388622287e218beddfa14a47ed677d4307b36b Mon Sep 17 00:00:00 2001 From: Fabio Bas Date: Fri, 25 Mar 2016 17:55:51 +0100 Subject: Removed simpletest and moved all tests in the unit tree Tests are executed now, but a lot of them need fixing. --- tests/unit/Data/ActiveRecord/CountRecordsTest.php | 36 +++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 tests/unit/Data/ActiveRecord/CountRecordsTest.php (limited to 'tests/unit/Data/ActiveRecord/CountRecordsTest.php') diff --git a/tests/unit/Data/ActiveRecord/CountRecordsTest.php b/tests/unit/Data/ActiveRecord/CountRecordsTest.php new file mode 100644 index 00000000..b97f83ed --- /dev/null +++ b/tests/unit/Data/ActiveRecord/CountRecordsTest.php @@ -0,0 +1,36 @@ +setDbConnection($conn); + } + + function test_count() + { + $finder = DepartmentRecord::finder(); + $count = $finder->count('"order" > ?', 2); + $this->assertTrue($count > 0); + } + + function test_count_zero() + { + $finder = DepartmentRecord::finder(); + $count = $finder->count('"order" > ?', 11); + $this->assertEqual($count,0); + } + + function test_count_without_parameter() + { + $finder = DepartmentRecord::finder(); + $this->assertEqual($finder->count(), 8); + } +} -- cgit v1.2.3