Updates to 3rd party libraries
Add Dockerfile and specific docker-php.ini
This commit is contained in:
40
inc/vendor/phpoffice/phpspreadsheet/tests/PhpSpreadsheetTests/SettingsTest.php
vendored
Normal file
40
inc/vendor/phpoffice/phpspreadsheet/tests/PhpSpreadsheetTests/SettingsTest.php
vendored
Normal file
@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
namespace PhpOffice\PhpSpreadsheetTests;
|
||||
|
||||
use PhpOffice\PhpSpreadsheet\Settings;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
class SettingsTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $prevValue;
|
||||
|
||||
public function setUp()
|
||||
{
|
||||
$this->prevValue = libxml_disable_entity_loader();
|
||||
libxml_disable_entity_loader(false); // Enable entity loader
|
||||
}
|
||||
|
||||
protected function tearDown()
|
||||
{
|
||||
libxml_disable_entity_loader($this->prevValue);
|
||||
}
|
||||
|
||||
public function testGetXMLSettings()
|
||||
{
|
||||
$result = Settings::getLibXmlLoaderOptions();
|
||||
self::assertTrue((bool) ((LIBXML_DTDLOAD | LIBXML_DTDATTR) & $result));
|
||||
self::assertFalse(libxml_disable_entity_loader());
|
||||
}
|
||||
|
||||
public function testSetXMLSettings()
|
||||
{
|
||||
Settings::setLibXmlLoaderOptions(LIBXML_DTDLOAD | LIBXML_DTDATTR | LIBXML_DTDVALID);
|
||||
$result = Settings::getLibXmlLoaderOptions();
|
||||
self::assertTrue((bool) ((LIBXML_DTDLOAD | LIBXML_DTDATTR | LIBXML_DTDVALID) & $result));
|
||||
self::assertFalse(libxml_disable_entity_loader());
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user