public function testCanNotRemoveWhenReadOnly() { $map = new TMap(array('key' => 'value'), true); try { $map->remove('key'); } catch (TInvalidOperationException $e) { return; } self::fail('An expected TInvalidOperationException was not raised'); }
/** * Removes an item from the map by its key. * This overrides the parent implementation by converting the key to lower case first if CaseSensitive is false. * @param mixed the key of the item to be removed * @return mixed the removed value, null if no such key exists. */ public function remove($key) { return parent::remove($this->_caseSensitive ? $key : strtolower($key)); }