Consolidate external EntityFactory

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
This commit is contained in:
Adrien Loison committed 2017-11-05 13:18:29 +01:00
1 parent 2d2151ac8d
commit 3d0f108b1d
12 files changed
+201 -170

No files matched your search

@@ -0,0 +1,21 @@
<?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');
}
}