public function testBody() { $doc = new XmlDocument(); $doc->renameRoot('myroot'); $root = $doc->element('root'); $root->attr('test', 'ok'); $equalCode = '<?xml version="1.0" encoding="UTF-8"?>' . PHP_EOL; $equalCode .= '<myroot test="ok">' . PHP_EOL; $equalCode .= '</myroot>'; $this->assertEquals($equalCode, $doc->render()); }
/** * {@inheritdoc} */ public function authorUrl($set = null) { $authorUrl = parent::authorUrl($set); if (is_string($set)) { $this->author(array('name' => $this->authorName->text(), 'email' => $this->authorEmail->text(), 'uri' => $authorUrl)); } return $authorUrl; }
/** * {@inheritdoc} */ public function lastModified($set = null) { $lastModified = parent::lastModified($set); if (is_string($set) && $lastModified instanceof \DateTime) { $this->filterDate($this->lastBuildDate, $lastModified->format(\DateTime::RSS)); } return $lastModified; }