/** * @expectedException \Box\Spout\Common\Exception\UnsupportedTypeException * * @return void */ public function testCreateWriterShouldThrowWithUnsupportedType() { WriterFactory::create('unsupportedType'); }
public function testGetDefaultWriterEmpty() { $writerFactory = new WriterFactory(); $this->assertNull($writerFactory->getDefaultWriter()); }
<?php include_once './Factory/WriterFactory.class.php'; $php = WriterFactory::create('php'); //$txt = WriterFactory::create('txt'); echo $php->writeHelloWorld();
/** * */ protected function initWriter() { $this->_writer = WriterFactory::createFromFile($this->getType(), $this->source->getPath(), $this->getOptions()); }