diff options
author | ctrlaltca <ctrlaltca@gmail.com> | 2014-08-26 16:59:21 +0200 |
---|---|---|
committer | ctrlaltca <ctrlaltca@gmail.com> | 2014-08-26 16:59:21 +0200 |
commit | 74b31be9515eddfa63005d6760614badfaba9fea (patch) | |
tree | 47c952901dcb5eccd6dd8b7c6ee7e0b6bf176510 /tests/unit/Collections/TAttributeCollectionTest.php | |
parent | 2b11341614ac4a15be697fa8acad07055154ac54 (diff) | |
parent | 0c5026b55cde5c104f10686afd8b441568175d38 (diff) |
Backports for Prado 3.2.4
Diffstat (limited to 'tests/unit/Collections/TAttributeCollectionTest.php')
-rw-r--r-- | tests/unit/Collections/TAttributeCollectionTest.php | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/tests/unit/Collections/TAttributeCollectionTest.php b/tests/unit/Collections/TAttributeCollectionTest.php index 5805f2d0..f61f58b3 100644 --- a/tests/unit/Collections/TAttributeCollectionTest.php +++ b/tests/unit/Collections/TAttributeCollectionTest.php @@ -19,7 +19,7 @@ class TAttributeCollectionTest extends PHPUnit_Framework_TestCase { self::assertEquals('value', $collection->Property); self::assertEquals(true, $collection->canGetProperty('Property')); } - + public function testCanNotGetUndefinedProperty() { $collection = new TAttributeCollection(array(), true); self::assertEquals(false, $collection->canGetProperty('Property')); @@ -37,7 +37,7 @@ class TAttributeCollectionTest extends PHPUnit_Framework_TestCase { self::assertEquals('value', $collection->itemAt('Property')); self::assertEquals(true, $collection->canSetProperty('Property')); } - + public function testCanNotSetPropertyIfReadOnly() { $collection = new TAttributeCollection(array(), true); try { @@ -47,7 +47,7 @@ class TAttributeCollectionTest extends PHPUnit_Framework_TestCase { } self::fail('An expected TInvalidOperationException was not raised'); } - + public function testGetCaseSensitive() { $collection = new TAttributeCollection(); $collection->setCaseSensitive(false); @@ -55,40 +55,40 @@ class TAttributeCollectionTest extends PHPUnit_Framework_TestCase { $collection->setCaseSensitive(true); self::assertEquals(true, $collection->getCaseSensitive()); } - + public function testSetCaseSensitive() { $collection = new TAttributeCollection(); $collection->Property = 'value'; $collection->setCaseSensitive(false); self::assertEquals('value', $collection->itemAt('property')); } - + public function testItemAt() { $collection = new TAttributeCollection(); $collection->Property = 'value'; self::assertEquals('value', $collection->itemAt('Property')); } - + public function testAdd() { $collection = new TAttributeCollection(); $collection->add('Property', 'value'); self::assertEquals('value', $collection->itemAt('Property')); } - + public function testRemove() { $collection = new TAttributeCollection(); $collection->add('Property', 'value'); $collection->remove('Property'); self::assertEquals(0, count($collection)); } - + public function testContains() { $collection = new TAttributeCollection(); self::assertEquals(false, $collection->contains('Property')); $collection->Property = 'value'; self::assertEquals(true, $collection->contains('Property')); } - + public function testHasProperty() { $collection = new TAttributeCollection(); self::assertEquals(false, $collection->hasProperty('Property')); @@ -98,4 +98,3 @@ class TAttributeCollectionTest extends PHPUnit_Framework_TestCase { } -?> |