Skip to content

Commit ceb3624

Browse files
authored
Merge pull request #1203 from PHPCSStandards/feature/update-test-for-php-8.5-removed-feature
PHP 8.5 | Update tests involving the `disable_classes` ini setting
2 parents 2878bd7 + bf848a9 commit ceb3624

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

tests/Core/Config/IniSetTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -300,10 +300,10 @@ public static function dataIniValueCannotBeUpdatedAtRuntime()
300300
return [
301301
// Using Core directives available PHP cross-version to prevent the tests failing
302302
// on an unavailable directive or due to an extension not being available.
303-
'php.ini only option: disable_classes' => [
304-
'option' => 'disable_classes',
305-
'newValue' => 'DateTime,DOMComment',
306-
'alternativeValue' => 'DOMComment,DateTime',
303+
'php.ini only option: expose_php' => [
304+
'option' => 'expose_php',
305+
'newValue' => '0',
306+
'alternativeValue' => '1',
307307
],
308308
'INI_PERDIR option: short_open_tag (bool)' => [
309309
'option' => 'short_open_tag',

tests/Core/Ruleset/IniSetFailIniOnlyTest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="IniSetTest" xsi:noNamespaceSchemaLocation="phpcs.xsd">
33
<description>Ruleset to test ini values which can not be changed at runtime will be reported as such when set from the ruleset.</description>
44

5-
<ini name="disable_classes" value="DateTime,DOMComment"/>
5+
<ini name="expose_php" value="0"/>
66

77
<!-- Prevent a "no sniff were registered" error. -->
88
<rule ref="Generic.PHP.BacktickOperator"/>

tests/Core/Ruleset/ProcessRulesetIniSetTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,10 +116,10 @@ public static function dataIniValueCannotBeUpdatedAtRuntime()
116116
return [
117117
// Using Core directives available PHP cross-version to prevent the tests failing
118118
// on an unavailable directive or due to an extension not being available.
119-
'php.ini only option: disable_classes' => [
119+
'php.ini only option: expose_php' => [
120120
'standard' => __DIR__.'/IniSetFailIniOnlyTest.xml',
121-
'option' => 'disable_classes',
122-
'expected' => 'DateTime,DOMComment',
121+
'option' => 'expose_php',
122+
'expected' => '0',
123123
],
124124
'INI_PERDIR option: short_open_tag' => [
125125
'standard' => __DIR__.'/IniSetFailIniPerDirTest.xml',

0 commit comments

Comments
 (0)