/** * @inheritdoc */ public function flush() { if (!$this->writer) { throw new \LogicException('Start writer first'); } $this->writer->flush(); }
/** * @expectedException \LogicException */ public function testFlushWithoutStart() { $writer = new XmlWriter(new TempFile()); $writer->flush(); }