From 903ae8a581fac1e6917fc3e31d2ad8fb91df80c3 Mon Sep 17 00:00:00 2001 From: ctrlaltca <> Date: Thu, 12 Jul 2012 11:21:01 +0000 Subject: standardize the use of unix eol; use svn properties to enforce native eol --- tests/simple_unit/SqlMap/PropertyAccessTest.php | 152 ++++++++++++------------ 1 file changed, 76 insertions(+), 76 deletions(-) (limited to 'tests/simple_unit/SqlMap/PropertyAccessTest.php') diff --git a/tests/simple_unit/SqlMap/PropertyAccessTest.php b/tests/simple_unit/SqlMap/PropertyAccessTest.php index 38573f4e..d580f965 100644 --- a/tests/simple_unit/SqlMap/PropertyAccessTest.php +++ b/tests/simple_unit/SqlMap/PropertyAccessTest.php @@ -1,77 +1,77 @@ -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->assertIdentical(10, TPropertyAccess::get($account, 'Id')); - $this->assertIdentical(12, TPropertyAccess::get($account, 'More.Id')); - $this->assertIdentical(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->assertIdentical(10, TPropertyAccess::get($account, 'Id')); - $this->assertIdentical(12, TPropertyAccess::get($account, 'More.Id')); - $this->assertIdentical(6, TPropertyAccess::get($account, 'More.More.Id')); - - $this->assertIdentical('hahaha', - TPropertyAccess::get($account, 'More.More.EmailAddress')); - } - - function testArrayAccessProperty() - { - $account = new AccountBis(); - $things['more'] = 1; - $things['accounts'] = $this->NewAccount6(); - $account->More = $things; - - $this->assertIdentical(6, TPropertyAccess::get($account, 'More.accounts.ID')); - - TPropertyAccess::set($account, 'More.accounts.EmailAddress', 'adssd'); - $this->assertIdentical('adssd', TPropertyAccess::get($account, 'More.accounts.EmailAddress')); - - $this->assertIdentical(1, TPropertyAccess::get($things, 'more')); - } - -} - - +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->assertIdentical(10, TPropertyAccess::get($account, 'Id')); + $this->assertIdentical(12, TPropertyAccess::get($account, 'More.Id')); + $this->assertIdentical(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->assertIdentical(10, TPropertyAccess::get($account, 'Id')); + $this->assertIdentical(12, TPropertyAccess::get($account, 'More.Id')); + $this->assertIdentical(6, TPropertyAccess::get($account, 'More.More.Id')); + + $this->assertIdentical('hahaha', + TPropertyAccess::get($account, 'More.More.EmailAddress')); + } + + function testArrayAccessProperty() + { + $account = new AccountBis(); + $things['more'] = 1; + $things['accounts'] = $this->NewAccount6(); + $account->More = $things; + + $this->assertIdentical(6, TPropertyAccess::get($account, 'More.accounts.ID')); + + TPropertyAccess::set($account, 'More.accounts.EmailAddress', 'adssd'); + $this->assertIdentical('adssd', TPropertyAccess::get($account, 'More.accounts.EmailAddress')); + + $this->assertIdentical(1, TPropertyAccess::get($things, 'more')); + } + +} + + ?> \ No newline at end of file -- cgit v1.2.3