/** * Creates a new Zend\Feed\Writer\Deleted 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 Deleted */ public function createTombstone() { $deleted = new Deleted(); if ($this->getEncoding()) { $deleted->setEncoding($this->getEncoding()); } $deleted->setType($this->getType()); return $deleted; }
public function testFluentInterface() { $entry = new Writer\Deleted(); $result = $entry->setType('type')->setBy(array('name' => 'foo'))->setComment('comment')->setEncoding('utf-8')->setReference('foo')->setWhen(null); $this->assertSame($result, $entry); }
public function testAddByThrowsExceptionIfNameOmittedFromArray() { $entry = new Writer\Deleted(); try { $entry->setBy(array('uri' => 'notauri')); $this->fail(); } catch (Writer\Exception $e) { } }
/** * @covers Zend\Feed\Writer\Deleted::getType * @covers Zend\Feed\Writer\Deleted::setType */ public function testType() { $entry = new Writer\Deleted(); $type = $entry->getType(); $this->assertNull($type); $entry->setType('atom'); $this->assertEquals('atom', $entry->getType()); }