2016-06-05 16:03:42 +00:00
|
|
|
<?php
|
|
|
|
|
2016-08-25 04:53:15 +00:00
|
|
|
namespace PhpSpreadsheetTests;
|
2016-06-05 16:03:42 +00:00
|
|
|
|
|
|
|
class SettingsTest extends \PHPUnit_Framework_TestCase
|
|
|
|
{
|
|
|
|
public function setUp()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
*/
|
|
|
|
public function testGetXMLSettings()
|
|
|
|
{
|
2016-08-26 06:39:29 +00:00
|
|
|
$result = \PhpSpreadsheet\Settings::getLibXmlLoaderOptions();
|
2016-06-05 16:03:42 +00:00
|
|
|
$this->assertTrue((bool) ((LIBXML_DTDLOAD | LIBXML_DTDATTR) & $result));
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
*/
|
|
|
|
public function testSetXMLSettings()
|
|
|
|
{
|
2016-08-16 15:33:57 +00:00
|
|
|
call_user_func_array([\PhpSpreadsheet\Settings::class, 'setLibXmlLoaderOptions'], [LIBXML_DTDLOAD | LIBXML_DTDATTR | LIBXML_DTDVALID]);
|
2016-08-26 06:39:29 +00:00
|
|
|
$result = \PhpSpreadsheet\Settings::getLibXmlLoaderOptions();
|
2016-06-05 16:03:42 +00:00
|
|
|
$this->assertTrue((bool) ((LIBXML_DTDLOAD | LIBXML_DTDATTR | LIBXML_DTDVALID) & $result));
|
|
|
|
}
|
|
|
|
}
|