summaryrefslogtreecommitdiff
path: root/tests/unit/SQLMap/PropertyAccessTest.php
diff options
context:
space:
mode:
authorctrlaltca <>2012-11-18 20:26:25 +0000
committerctrlaltca <>2012-11-18 20:26:25 +0000
commit43233000543984eda49768edde65076fb9c2468c (patch)
tree48578b1c5485c1f3342796cf7efa024882efd726 /tests/unit/SQLMap/PropertyAccessTest.php
parent6dff17fee04f8b8a1f35ec8e9afe65ae32b2684c (diff)
dropped old tests referring to unexisting components (NOTE: this includes what seems a test suite for an older version of SQLMap)
Diffstat (limited to 'tests/unit/SQLMap/PropertyAccessTest.php')
-rw-r--r--tests/unit/SQLMap/PropertyAccessTest.php77
1 files changed, 0 insertions, 77 deletions
diff --git a/tests/unit/SQLMap/PropertyAccessTest.php b/tests/unit/SQLMap/PropertyAccessTest.php
deleted file mode 100644
index 0e17e8d5..00000000
--- a/tests/unit/SQLMap/PropertyAccessTest.php
+++ /dev/null
@@ -1,77 +0,0 @@
-<?php
-
-require_once(dirname(__FILE__).'/BaseTest.php');
-
-/**
- * @package System.DataAccess.SQLMap
- */
-class PropertyAccessTest extends BaseTest
-{
- function testGetPublicProperty()
- {
- $account = new AccountBis();
-
- $account->Id = 10;
- $account->FirstName = "Luky";
- $account->LastName = "Luke";
- $account->EmailAddress = "luly.luke@somewhere.com";
-
- $two = new AccountBis();
- $two->Id = 12;
- $two->FirstName = "Mini Me!";
- $account->More = $two;
-
- $account6 = $this->NewAccount6();
- $two->More = $account6;
-
- $this->assertEquals(10, TPropertyAccess::get($account, 'Id'));
- $this->assertEquals(12, TPropertyAccess::get($account, 'More.Id'));
- $this->assertEquals(6, TPropertyAccess::get($account, 'More.More.Id'));
- }
-
- function testSetPublicProperty()
- {
- $account = new AccountBis();
-
- $account->Id = 10;
- $account->FirstName = "Luky";
- $account->LastName = "Luke";
- $account->EmailAddress = "luly.luke@somewhere.com";
-
- $two = new AccountBis();
- $two->Id = 12;
- $two->FirstName = "Mini Me!";
- TPropertyAccess::set($account, 'More', $two);
-
- $account6 = $this->NewAccount6();
- TPropertyAccess::set($account, 'More.More', $account6);
-
- TPropertyAccess::set($account, 'More.More.EmailAddress', 'hahaha');
-
- $this->assertEquals(10, TPropertyAccess::get($account, 'Id'));
- $this->assertEquals(12, TPropertyAccess::get($account, 'More.Id'));
- $this->assertEquals(6, TPropertyAccess::get($account, 'More.More.Id'));
-
- $this->assertEquals('hahaha',
- TPropertyAccess::get($account, 'More.More.EmailAddress'));
- }
-
- function testArrayAccessProperty()
- {
- $account = new AccountBis();
- $things['more'] = 1;
- $things['accounts'] = $this->NewAccount6();
- $account->More = $things;
-
- $this->assertEquals(6, TPropertyAccess::get($account, 'More.accounts.ID'));
-
- TPropertyAccess::set($account, 'More.accounts.EmailAddress', 'adssd');
- $this->assertEquals('adssd', TPropertyAccess::get($account, 'More.accounts.EmailAddress'));
-
- $this->assertEquals(1, TPropertyAccess::get($things, 'more'));
- }
-
-}
-
-
-?> \ No newline at end of file