diff --git a/tests/PhpSpreadsheetTests/SettingsTest.php b/tests/PhpSpreadsheetTests/SettingsTest.php index 11b93ae6..80dc07ab 100644 --- a/tests/PhpSpreadsheetTests/SettingsTest.php +++ b/tests/PhpSpreadsheetTests/SettingsTest.php @@ -41,6 +41,7 @@ class SettingsTest extends TestCase public function testSetXMLSettings(): void { + $original = Settings::getLibXmlLoaderOptions(); Settings::setLibXmlLoaderOptions(LIBXML_DTDLOAD | LIBXML_DTDATTR | LIBXML_DTDVALID); $result = Settings::getLibXmlLoaderOptions(); self::assertTrue((bool) ((LIBXML_DTDLOAD | LIBXML_DTDATTR | LIBXML_DTDVALID) & $result)); @@ -48,5 +49,6 @@ class SettingsTest extends TestCase if (\PHP_VERSION_ID < 80000) { self::assertFalse(libxml_disable_entity_loader()); } + Settings::setLibXmlLoaderOptions($original); } } diff --git a/tests/PhpSpreadsheetTests/Shared/PasswordReloadTest.php b/tests/PhpSpreadsheetTests/Shared/PasswordReloadTest.php index 6d127496..b6c28b17 100644 --- a/tests/PhpSpreadsheetTests/Shared/PasswordReloadTest.php +++ b/tests/PhpSpreadsheetTests/Shared/PasswordReloadTest.php @@ -9,18 +9,6 @@ use PhpOffice\PhpSpreadsheetTests\Functional\AbstractFunctional; class PasswordReloadTest extends AbstractFunctional { /** - * I don't know why separate process is needed for this test. - * I get a weird error without it, and I would rather just scrap the test - * than spend any more time debugging it. - * The test works fine without separate process (on Windows) with: - * php vendor\phpunit\phpunit\phpunit tests\PhpSpreadsheetTests\Shared\ - * But it fails with: - * php vendor\phpunit\phpunit\phpunit tests\PhpSpreadsheetTests\ - * The error is a mysterious: - * simplexml_load_string(): validity error : Validation failed: no DTD found ! - * - * @runInSeparateProcess - * @preserveGlobalState disabled * @dataProvider providerPasswords */ public function testPasswordReload(string $format, string $algorithm, bool $supported = true): void