summaryrefslogtreecommitdiff
path: root/tests/unit/Collections/TAttributeCollectionTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unit/Collections/TAttributeCollectionTest.php')
-rw-r--r--tests/unit/Collections/TAttributeCollectionTest.php19
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 {
}
-?>