public function getElementByName($name) { if (!isset($this->elements[$name])) { throw new DocBlockException("No element with name '{$name}'", DocBlockException::NotFound); } return $this->elements[$name]; }
/** * @covers TheSeer\phpDox\DocBlock\DocBlock::getElementByName */ public function testElementCanBeRetreived() { $this->docBlock->appendElement($this->element); $this->assertEquals($this->element, $this->docBlock->getElementByName('stub')); }