summaryrefslogtreecommitdiff
path: root/tests/simple_unit/SqlMap/DelegateTest.php
diff options
context:
space:
mode:
authorctrlaltca <>2012-07-12 11:21:01 +0000
committerctrlaltca <>2012-07-12 11:21:01 +0000
commit903ae8a581fac1e6917fc3e31d2ad8fb91df80c3 (patch)
treee08bf04f0823650a231227ac3499121270172a23 /tests/simple_unit/SqlMap/DelegateTest.php
parent3e4e6e66aeb3f8fea4e1eb4237498ef9d2358f63 (diff)
standardize the use of unix eol; use svn properties to enforce native eol
Diffstat (limited to 'tests/simple_unit/SqlMap/DelegateTest.php')
-rw-r--r--tests/simple_unit/SqlMap/DelegateTest.php126
1 files changed, 63 insertions, 63 deletions
diff --git a/tests/simple_unit/SqlMap/DelegateTest.php b/tests/simple_unit/SqlMap/DelegateTest.php
index 32c47fd1..800e4240 100644
--- a/tests/simple_unit/SqlMap/DelegateTest.php
+++ b/tests/simple_unit/SqlMap/DelegateTest.php
@@ -1,64 +1,64 @@
-<?php
-require_once(dirname(__FILE__).'/BaseCase.php');
-
-/**
- * @package System.DataAccess.SQLMap
- */
-class DelegateTest extends BaseCase
-{
- function __construct()
- {
- parent::__construct();
- $this->initSqlMap();
- }
-
- function testListDelegate()
- {
- $list = $this->sqlmap->queryWithRowDelegate(
- "GetAllAccountsViaResultMap", array($this, 'listHandler'));
-
- $this->assertIdentical(5, count($list));
- $this->assertAccount1($list[0]);
- $this->assertIdentical(1, $list[0]->getID());
- $this->assertIdentical(2, $list[1]->getID());
- $this->assertIdentical(3, $list[2]->getID());
- $this->assertIdentical(4, $list[3]->getID());
- $this->assertIdentical(5, $list[4]->getID());
- }
-
- /**
- * Test ExecuteQueryForMap : Hashtable.
- */
- function testExecuteQueryForMap()
- {
- $map = $this->sqlmap->QueryForMapWithRowDelegate(
- "GetAllAccountsViaResultClass", array($this, 'mapHandler'), null, "FirstName");
-
- $this->assertIdentical(5, count($map));
- $this->assertAccount1($map["Joe"]);
-
- $this->assertIdentical(1, $map["Joe"]->getID());
- $this->assertIdentical(2, $map["Averel"]->getID());
- $this->assertIdentical(3, $map["William"]->getID());
- $this->assertIdentical(4, $map["Jack"]->getID());
- $this->assertIdentical(5, $map["Gilles"]->getID());
- }
-
- public function listHandler($sender, $param)
- {
- $list = &$param->getList();
- $list[] = $param->result;
- $this->assertTrue($param->result instanceof Account);
- }
-
- public function mapHandler($sender, $param)
- {
- $map = &$param->getMap();
- $map[$param->getKey()] = $param->getValue();
- $this->assertTrue($param->getValue() instanceof Account);
- }
-}
-
-
-
+<?php
+require_once(dirname(__FILE__).'/BaseCase.php');
+
+/**
+ * @package System.DataAccess.SQLMap
+ */
+class DelegateTest extends BaseCase
+{
+ function __construct()
+ {
+ parent::__construct();
+ $this->initSqlMap();
+ }
+
+ function testListDelegate()
+ {
+ $list = $this->sqlmap->queryWithRowDelegate(
+ "GetAllAccountsViaResultMap", array($this, 'listHandler'));
+
+ $this->assertIdentical(5, count($list));
+ $this->assertAccount1($list[0]);
+ $this->assertIdentical(1, $list[0]->getID());
+ $this->assertIdentical(2, $list[1]->getID());
+ $this->assertIdentical(3, $list[2]->getID());
+ $this->assertIdentical(4, $list[3]->getID());
+ $this->assertIdentical(5, $list[4]->getID());
+ }
+
+ /**
+ * Test ExecuteQueryForMap : Hashtable.
+ */
+ function testExecuteQueryForMap()
+ {
+ $map = $this->sqlmap->QueryForMapWithRowDelegate(
+ "GetAllAccountsViaResultClass", array($this, 'mapHandler'), null, "FirstName");
+
+ $this->assertIdentical(5, count($map));
+ $this->assertAccount1($map["Joe"]);
+
+ $this->assertIdentical(1, $map["Joe"]->getID());
+ $this->assertIdentical(2, $map["Averel"]->getID());
+ $this->assertIdentical(3, $map["William"]->getID());
+ $this->assertIdentical(4, $map["Jack"]->getID());
+ $this->assertIdentical(5, $map["Gilles"]->getID());
+ }
+
+ public function listHandler($sender, $param)
+ {
+ $list = &$param->getList();
+ $list[] = $param->result;
+ $this->assertTrue($param->result instanceof Account);
+ }
+
+ public function mapHandler($sender, $param)
+ {
+ $map = &$param->getMap();
+ $map[$param->getKey()] = $param->getValue();
+ $this->assertTrue($param->getValue() instanceof Account);
+ }
+}
+
+
+
?> \ No newline at end of file