Ejemplo n.º 1
0
 public function writeDublinCore(RssWriter $rssWriter, DublinCore $dc)
 {
     $writer = $rssWriter->getXmlWriter();
     $writer->startElement('dc:creator');
     $writer->writeCdata($dc->getCreator());
     $writer->endElement();
 }
Ejemplo n.º 2
0
 public function test()
 {
     $writer = new DublinCoreWriter();
     $rssWriter = new RssWriter();
     $dc = new DublinCore();
     $dc->setCreator('John Doe');
     $writer->writeDublinCore($rssWriter, $dc);
     $this->assertSame("<dc:creator><![CDATA[John Doe]]></dc:creator>", $rssWriter->getXmlWriter()->flush());
 }
Ejemplo n.º 3
0
 public function testDublinCore()
 {
     $dc = new DublinCore();
     $dc->setCreator('M')->setCreator('John Doe');
     $this->assertSame('John Doe', $dc->getCreator());
 }