public function testCanNotClearWhenReadOnly() { $list = new TList(array(1, 2, 3), true); try { $list->clear(); } catch (TInvalidOperationException $e) { return; } self::fail('An expected TInvalidOperationException was not raised'); }
/** * Overrides the parent implementation by invoking {@link TControl::clearNamingContainer} */ public function clear() { parent::clear(); if ($this->_o instanceof INamingContainer) { $this->_o->clearNamingContainer(); } }