Exemplo n.º 1
0
 /**
  * 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;
 }
Exemplo n.º 2
0
 public function testSetNameAndGetName()
 {
     $this->assertSame('', $this->rfc->getName());
     $this->rfc->setName('name');
     $this->assertSame('name', $this->rfc->getName());
 }