diff --git a/tests/Util/ConfigurationTest.php b/tests/Util/ConfigurationTest.php index 3ce01fe3afb..d598cccca69 100644 --- a/tests/Util/ConfigurationTest.php +++ b/tests/Util/ConfigurationTest.php @@ -286,7 +286,7 @@ public function testPHPConfigurationIsReadCorrectly(): void \dirname(__DIR__) . DIRECTORY_SEPARATOR . '_files' . DIRECTORY_SEPARATOR . '.', '/path/to/lib' ], - 'ini' => ['foo' => ['value' => 'bar']], + 'ini' => ['foo' => ['value' => 'bar'], 'highlight.keyword' => ['value' => '#123456'], 'highlight.string' => ['value' => 'TEST_CONFIG_INI_CONSTANT']], 'const' => ['FOO' => ['value' => false], 'BAR' => ['value' => true]], 'var' => ['foo' => ['value' => false]], 'env' => ['foo' => ['value' => true], 'bar' => ['value' => 'true', 'verbatim' => true], 'foo_force' => ['value' => 'forced', 'force' => true]], @@ -306,10 +306,16 @@ public function testPHPConfigurationIsReadCorrectly(): void */ public function testPHPConfigurationIsHandledCorrectly(): void { + \define('TEST_CONFIG_INI_CONSTANT', '#234567'); + $savedIniHighlightKeyword = \ini_get('highlight.keyword'); + $savedIniHighlightString = \ini_get('highlight.string'); + $this->configuration->handlePHPConfiguration(); $path = \dirname(__DIR__) . DIRECTORY_SEPARATOR . '_files' . DIRECTORY_SEPARATOR . '.' . PATH_SEPARATOR . '/path/to/lib'; $this->assertStringStartsWith($path, \ini_get('include_path')); + $this->assertEquals('#123456', \ini_get('highlight.keyword')); + $this->assertEquals(TEST_CONFIG_INI_CONSTANT, \ini_get('highlight.string')); $this->assertFalse(\FOO); $this->assertTrue(\BAR); $this->assertFalse($GLOBALS['foo']); @@ -321,6 +327,9 @@ public function testPHPConfigurationIsHandledCorrectly(): void $this->assertEquals('bar', $_SERVER['foo']); $this->assertEquals('bar', $_FILES['foo']); $this->assertEquals('bar', $_REQUEST['foo']); + + \ini_set('highlight.keyword', $savedIniHighlightKeyword); + \ini_set('highlight.string', $savedIniHighlightString); } /** diff --git a/tests/_files/configuration.xml b/tests/_files/configuration.xml index 84f32929fba..15f1a63f049 100644 --- a/tests/_files/configuration.xml +++ b/tests/_files/configuration.xml @@ -143,6 +143,8 @@ . /path/to/lib + + diff --git a/tests/_files/configuration_xinclude.xml b/tests/_files/configuration_xinclude.xml index ab5220883cd..8766b5f7c53 100644 --- a/tests/_files/configuration_xinclude.xml +++ b/tests/_files/configuration_xinclude.xml @@ -64,6 +64,8 @@ . /path/to/lib + +