2016-06-05 16:03:42 +00:00
|
|
|
<?php
|
|
|
|
|
2016-08-31 17:18:12 +00:00
|
|
|
namespace PhpOffice\PhpSpreadsheetTests;
|
2016-06-05 16:03:42 +00:00
|
|
|
|
|
|
|
class SettingsTest extends \PHPUnit_Framework_TestCase
|
|
|
|
{
|
|
|
|
public function setUp()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
public function testGetXMLSettings()
|
|
|
|
{
|
2016-08-31 17:18:12 +00:00
|
|
|
$result = \PhpOffice\PhpSpreadsheet\Settings::getLibXmlLoaderOptions();
|
2016-06-05 16:03:42 +00:00
|
|
|
$this->assertTrue((bool) ((LIBXML_DTDLOAD | LIBXML_DTDATTR) & $result));
|
|
|
|
}
|
|
|
|
|
|
|
|
public function testSetXMLSettings()
|
|
|
|
{
|
2017-01-23 05:49:10 +00:00
|
|
|
\PhpOffice\PhpSpreadsheet\Settings::setLibXmlLoaderOptions(LIBXML_DTDLOAD | LIBXML_DTDATTR | LIBXML_DTDVALID);
|
2016-08-31 17:18:12 +00:00
|
|
|
$result = \PhpOffice\PhpSpreadsheet\Settings::getLibXmlLoaderOptions();
|
2016-06-05 16:03:42 +00:00
|
|
|
$this->assertTrue((bool) ((LIBXML_DTDLOAD | LIBXML_DTDATTR | LIBXML_DTDVALID) & $result));
|
|
|
|
}
|
|
|
|
}
|