Ejemplo n.º 1
0
 public function testItemContent()
 {
     $parser = new Rss10(file_get_contents('tests/fixtures/planete-jquery.xml'));
     $feed = $parser->execute();
     $this->assertNotEmpty($feed->items);
     $this->assertTrue(strpos($feed->items[1]->getContent(), '<a href="http://www.lafermeduweb.net') === 0);
 }
Ejemplo n.º 2
0
 public function testFindItemEnclosure()
 {
     $parser = new Rss10(file_get_contents('tests/fixtures/rss_10.xml'));
     $feed = $parser->execute();
     $this->assertEquals('', $feed->items[0]->getEnclosureUrl());
     $this->assertEquals('', $feed->items[0]->getEnclosureType());
 }