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/SqlMap/queryForListLimitTest.php | 38 ++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 tests/unit/Data/SqlMap/queryForListLimitTest.php (limited to 'tests/unit/Data/SqlMap/queryForListLimitTest.php') diff --git a/tests/unit/Data/SqlMap/queryForListLimitTest.php b/tests/unit/Data/SqlMap/queryForListLimitTest.php new file mode 100644 index 00000000..7038dc68 --- /dev/null +++ b/tests/unit/Data/SqlMap/queryForListLimitTest.php @@ -0,0 +1,38 @@ +initSqlMap(); + + //force autoload + new Account; + } + + function resetDatabase() + { + $this->initScript('account-init.sql'); + } + + function test_accounts_limit_2() + { + $list1 = $this->sqlmap->queryForList('GetAllAccountsAsArrayListViaResultClass',null,null,1,2); + $this->assertEqual(count($list1),2); + + $this->assertEqual($list1[0][0],'2'); + $this->assertEqual($list1[0][1],'Averel'); + $this->assertEqual($list1[0][2],'Dalton'); + + $this->assertEqual($list1[1][0],'3'); + $this->assertEqual($list1[1][1],'William'); + $this->assertEqual($list1[1][2],'Dalton'); + } +} -- cgit v1.2.3