Exemple #1
0
 /**
  * Creates a new Zend\Feed\Writer\Entry data container for use. This is NOT
  * added to the current feed automatically, but is necessary to create a
  * container with some initial values preset based on the current feed data.
  *
  * @return \Zend\Feed\Writer\Entry
  */
 public function createEntry()
 {
     $entry = new Entry();
     if ($this->getEncoding()) {
         $entry->setEncoding($this->getEncoding());
     }
     $entry->setType($this->getType());
     return $entry;
 }
Exemple #2
0
 /**
  * @covers Zend\Feed\Writer\Entry::setEncoding
  */
 public function testSetEncodingThrowsExceptionIfNull()
 {
     $entry = new Writer\Entry();
     try {
         $entry->setEncoding(null);
         $this->fail();
     } catch (Writer\Exception\InvalidArgumentException $e) {
     }
 }