/** * Add RFC name to entity * * @return self */ public function loadName() { $xPath = new \DOMXPath($this->document); $heading = $xPath->query(CssSelector::toXPath('h1'))->item(0)->textContent; $name = trim(str_replace('PHP RFC:', '', $heading)); $this->rfc->setName($name); return $this; }
public function testSetNameAndGetName() { $this->assertSame('', $this->rfc->getName()); $this->rfc->setName('name'); $this->assertSame('name', $this->rfc->getName()); }