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:
1 parent
0c90d102ef
commit
d2ac54c578
10 files changed
+333
-5
No files matched your search
@@ -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
|
||||
|
||||
Reference in new issue
Block a user