Beispiel #1
0
 /**
  * @expectedException \Box\Spout\Common\Exception\UnsupportedTypeException
  *
  * @return void
  */
 public function testCreateWriterShouldThrowWithUnsupportedType()
 {
     WriterFactory::create('unsupportedType');
 }
Beispiel #2
0
 public function testGetDefaultWriterEmpty()
 {
     $writerFactory = new WriterFactory();
     $this->assertNull($writerFactory->getDefaultWriter());
 }
Beispiel #3
0
<?php

include_once './Factory/WriterFactory.class.php';
$php = WriterFactory::create('php');
//$txt = WriterFactory::create('txt');
echo $php->writeHelloWorld();
Beispiel #4
0
 /**
  * 
  */
 protected function initWriter()
 {
     $this->_writer = WriterFactory::createFromFile($this->getType(), $this->source->getPath(), $this->getOptions());
 }