Prevent entity loading when reading XML
Added LIBXML_NOENT option when reading a XML file libxml_disable_entity_loader(true) cannot be used because it disables the use of XMLReader::open()... see https://bugs.php.net/bug.php?id=62577
This commit is contained in:
1 parent
d4cf853270
commit
7d922e6776
3 files changed
+3
-3
No files matched your search
@@ -250,7 +250,7 @@ class XLSXTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
$allRows = $this->getAllRowsForFile('billion_laughs_test_file.xlsx');
|
||||
|
||||
$expectedMaxMemoryUsage = 20 * 1024 * 1024; // 20MB
|
||||
$expectedMaxMemoryUsage = 30 * 1024 * 1024; // 30MB
|
||||
$this->assertLessThan($expectedMaxMemoryUsage, memory_get_peak_usage(true), 'Entities should not be expanded and therefore consume all the memory.');
|
||||
|
||||
$expectedFirstRow = ['s1--A1', 's1--B1', 's1--C1', 's1--D1', 's1--E1'];
|
||||
|
||||
Reference in new issue
Block a user