/**
  * Sets up the fixture, for example, opens a network connection.
  * This method is called before a test is executed.
  */
 protected function setUp()
 {
     $this->object = new FeedContent();
     $this->object->setPublicId(self::id);
     $this->object->setLink(self::link);
     $this->object->setTitle(self::title);
     $this->object->setDescription(self::subtitle);
     $this->object->setLastModified(new \DateTime());
     for ($i = 0; $i < 5; ++$i) {
         $item = new Item();
         $item->setPublicId($i);
         $this->object->addItem($item);
     }
     $lastModified = new \DateTime();
     $this->object->setLastModified($lastModified);
 }
Example #2
0
 /**
  * @covers Debril\RssAtomBundle\Protocol\Parser\Item::setPublicId
  * @covers Debril\RssAtomBundle\Protocol\Parser\Item::getPublicId
  */
 public function testSetPublicId()
 {
     $id = uniqid();
     $this->object->setPublicId($id);
     $this->assertEquals($id, $this->object->getPublicId());
 }