diff options
author | ctrlaltca <> | 2012-07-12 11:21:01 +0000 |
---|---|---|
committer | ctrlaltca <> | 2012-07-12 11:21:01 +0000 |
commit | 903ae8a581fac1e6917fc3e31d2ad8fb91df80c3 (patch) | |
tree | e08bf04f0823650a231227ac3499121270172a23 /tests/simple_unit/SqlMap/TestQueryForMap.php | |
parent | 3e4e6e66aeb3f8fea4e1eb4237498ef9d2358f63 (diff) |
standardize the use of unix eol; use svn properties to enforce native eol
Diffstat (limited to 'tests/simple_unit/SqlMap/TestQueryForMap.php')
-rw-r--r-- | tests/simple_unit/SqlMap/TestQueryForMap.php | 84 |
1 files changed, 42 insertions, 42 deletions
diff --git a/tests/simple_unit/SqlMap/TestQueryForMap.php b/tests/simple_unit/SqlMap/TestQueryForMap.php index 25ef2f4d..89676469 100644 --- a/tests/simple_unit/SqlMap/TestQueryForMap.php +++ b/tests/simple_unit/SqlMap/TestQueryForMap.php @@ -1,43 +1,43 @@ -<?php
-require_once(dirname(__FILE__).'/BaseCase.php');
-
-class TestQueryForMap extends BaseCase
-{
- function __construct()
- {
- parent::__construct();
- $this->initSqlMap();
- }
-
- /**
- * Test ExecuteQueryForMap : Hashtable.
- */
- function testExecuteQueryForMap()
- {
- $map = $this->sqlmap->QueryForMap("GetAllAccountsViaResultClass", null, "FirstName",null,0,2);
- $this->assertIdentical(2, count($map));
- $this->assertAccount1($map["Joe"]);
-
- $this->assertIdentical(1, $map["Joe"]->getID());
- $this->assertIdentical(2, $map["Averel"]->getID());
- }
-
- /**
- * Test ExecuteQueryForMap with value property :
- * "FirstName" as key, "EmailAddress" as value
- */
- function testExecuteQueryForMapWithValueProperty()
- {
- $map = $this->sqlmap->QueryForMap("GetAllAccountsViaResultClass", null,
- "FirstName", "EmailAddress",1,3);
-
- $this->assertIdentical(3, count($map));
-
- $this->assertIdentical("Averel.Dalton@somewhere.com", $map["Averel"]);
- $this->assertNull($map["William"]);
- $this->assertIdentical("Jack.Dalton@somewhere.com", $map["Jack"]);
- }
-
-}
-
+<?php +require_once(dirname(__FILE__).'/BaseCase.php'); + +class TestQueryForMap extends BaseCase +{ + function __construct() + { + parent::__construct(); + $this->initSqlMap(); + } + + /** + * Test ExecuteQueryForMap : Hashtable. + */ + function testExecuteQueryForMap() + { + $map = $this->sqlmap->QueryForMap("GetAllAccountsViaResultClass", null, "FirstName",null,0,2); + $this->assertIdentical(2, count($map)); + $this->assertAccount1($map["Joe"]); + + $this->assertIdentical(1, $map["Joe"]->getID()); + $this->assertIdentical(2, $map["Averel"]->getID()); + } + + /** + * Test ExecuteQueryForMap with value property : + * "FirstName" as key, "EmailAddress" as value + */ + function testExecuteQueryForMapWithValueProperty() + { + $map = $this->sqlmap->QueryForMap("GetAllAccountsViaResultClass", null, + "FirstName", "EmailAddress",1,3); + + $this->assertIdentical(3, count($map)); + + $this->assertIdentical("Averel.Dalton@somewhere.com", $map["Averel"]); + $this->assertNull($map["William"]); + $this->assertIdentical("Jack.Dalton@somewhere.com", $map["Jack"]); + } + +} + ?>
\ No newline at end of file |