Custom stream wrapper support

Added support for custom stream wrappers, such as "fly" or "s3".
Support is determined per reader.
This commit is contained in:
Adrien Loison committed 2016-03-18 17:09:13 -07:00
1 parent 0c90d102ef
commit d2ac54c578
10 files changed
+333 -5

No files matched your search

+24
View File
@@ -404,6 +404,30 @@ class ReaderTest extends \PHPUnit_Framework_TestCase
$this->assertEquals($expectedRows, $allRows);
}
/**
* @expectedException \Box\Spout\Common\Exception\IOException
*
* @return void
*/
public function testReadWithUnsupportedCustomStreamWrapper()
{
/** @var \Box\Spout\Reader\XLSX\Reader $reader */
$reader = ReaderFactory::create(Type::XLSX);
$reader->open('unsupported://foobar');
}
/**
* @expectedException \Box\Spout\Common\Exception\IOException
*
* @return void
*/
public function testReadWithSupportedCustomStreamWrapper()
{
/** @var \Box\Spout\Reader\XLSX\Reader $reader */
$reader = ReaderFactory::create(Type::XLSX);
$reader->open('php://memory');
}
/**
* @param string $fileName
* @return array All the read rows the given file