PhpSpreadsheet/tests/PhpSpreadsheetTests/Shared/OLEReadTest.php
bayzhanov 08b4456641
Xls file threw exception during open by Xls reader
Ignore some exception in property, if stream is empty

Fixes #402
Fixes #659
2018-10-07 18:49:01 +11:00

29 lines
789 B
PHP

<?php
namespace PhpOffice\PhpSpreadsheetTests\Shared;
use PhpOffice\PhpSpreadsheet\Shared\OLERead;
use PHPUnit\Framework\TestCase;
class OLEReadTest extends TestCase
{
public function testReadOleStreams()
{
$dataDir = './data/Shared/OLERead/';
$ole = new OLERead();
$ole->read('./data/Reader/XLS/sample.xls');
self::assertEquals(
file_get_contents($dataDir . 'wrkbook'),
$ole->getStream($ole->wrkbook)
);
self::assertEquals(
file_get_contents($dataDir . 'summary'),
$ole->getStream($ole->summaryInformation)
);
self::assertEquals(
file_get_contents($dataDir . 'document'),
$ole->getStream($ole->documentSummaryInformation)
);
}
}