/** * testGetElementThrowsFormElementNotFoundExceptionForUnknownElement * * @covers \ArpForm\Service\FormElementProvider::getElement * @test */ public function testGetElementThrowsFormElementNotFoundExceptionForUnknownElement() { $formElement = new FormElementProvider(); $this->setExpectedException(FormElementNotFoundException::class); $formElement->getElement('foo'); }
/** * @inheritdoc */ public function getElement($name, array $creationOptions = []) { $this->loadElement($name, $creationOptions); $element = parent::getElement($name); if (!empty($creationOptions)) { $this->removeElement($name); } return $element; }