Example #1
0
 public function testAddsAndOrdersEntriesByDateIfRequested()
 {
     $writer = new Zend_Feed_Writer();
     $entry = $writer->createEntry();
     $entry->setDateCreated(1234567890);
     $entry2 = $writer->createEntry();
     $entry2->setDateCreated(1230000000);
     $writer->addEntry($entry);
     $writer->addEntry($entry2);
     $writer->orderByDate();
     $this->assertEquals(1230000000, $writer->getEntry(1)->getDateCreated()->get(Zend_Date::TIMESTAMP));
 }