/** * @param string $rfcLocation */ private function loadRfc($rfcLocation, $rfcCode) { // Suppress HTML5 errors libxml_use_internal_errors(true); $this->document = new \DOMDocument(); $this->document->loadHTMLFile($rfcLocation); // Turn errors back on libxml_use_internal_errors(false); $this->rfc = new Rfc(); $this->rfc->setCode($rfcCode); $this->rfc->setRawContent($this->document->saveHTML()); }
public function testSetCodeAndGetCode() { $this->assertSame('', $this->rfc->getCode()); $this->rfc->setCode('code'); $this->assertSame('code', $this->rfc->getCode()); }