public function testRemove() { $collection = new TAttributeCollection(); $collection->add('Property', 'value'); $collection->remove('Property'); self::assertEquals(0, count($collection)); }
/** * This method overrides the parent implementation. * * @param mixed $key * @param mixed $value */ public function add($key, $value) { foreach (self::getAvailableProperties() as $k => $v) { if (strtolower($key) == strtolower($k)) { return parent::add($key, $value); } } throw new TNotSupportedException('Property not supported.'); }