All entities will now be created through a single factory (including the Writers). Also, added a EntityFactory::createRowFromArray() to make it easier to create rows
22 lines
449 B
PHP
22 lines
449 B
PHP
<?php
|
|
|
|
namespace Box\Spout\Writer\Common\Creator;
|
|
|
|
use Box\Spout\Common\Exception\UnsupportedTypeException;
|
|
|
|
/**
|
|
* Class WriterFactoryTest
|
|
*/
|
|
class WriterFactoryTest extends \PHPUnit_Framework_TestCase
|
|
{
|
|
/**
|
|
* @return void
|
|
*/
|
|
public function testCreateWriterShouldThrowWithUnsupportedType()
|
|
{
|
|
$this->expectException(UnsupportedTypeException::class);
|
|
|
|
(new WriterFactory())->create('unsupportedType');
|
|
}
|
|
}
|