aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2025-12-05 07:17:10 +0100
committerGravatar GitHub <noreply@github.com> 2025-12-05 07:17:10 +0100
commit9a3945487811f95f19b77ecc9e82428182263d36 (patch)
tree8e5d25b596ad9c32d3513071b0a534841c57bdba /tests
parent6d2bb24b3772a7b839d6911c1e1fe27151d29bfa (diff)
PHP 8.5: Remove ReflectionProperty::setAccessible (#8284)
https://php.net/reflectionproperty.setaccessible > As of PHP 8.1.0, calling this method has no effect; all properties are accessible by default. > This function has been DEPRECATED as of PHP 8.5.0.
Diffstat (limited to 'tests')
-rw-r--r--tests/cli/i18n/I18nCompletionValidatorTest.php2
-rw-r--r--tests/cli/i18n/I18nUsageValidatorTest.php2
-rw-r--r--tests/cli/i18n/I18nValueTest.php1
3 files changed, 0 insertions, 5 deletions
diff --git a/tests/cli/i18n/I18nCompletionValidatorTest.php b/tests/cli/i18n/I18nCompletionValidatorTest.php
index 7eb32d8a3..39baa5d69 100644
--- a/tests/cli/i18n/I18nCompletionValidatorTest.php
+++ b/tests/cli/i18n/I18nCompletionValidatorTest.php
@@ -20,13 +20,11 @@ final class I18nCompletionValidatorTest extends \PHPUnit\Framework\TestCase {
self::assertSame("There is no data.\n", $validator->displayReport());
$reflectionTotalEntries = new ReflectionProperty(I18nCompletionValidator::class, 'totalEntries');
- $reflectionTotalEntries->setAccessible(true);
$reflectionTotalEntries->setValue($validator, 100);
self::assertSame("Translation is 0.0% complete.\n", $validator->displayReport());
$reflectionPassEntries = new ReflectionProperty(I18nCompletionValidator::class, 'passEntries');
- $reflectionPassEntries->setAccessible(true);
$reflectionPassEntries->setValue($validator, 25);
self::assertSame("Translation is 25.0% complete.\n", $validator->displayReport());
diff --git a/tests/cli/i18n/I18nUsageValidatorTest.php b/tests/cli/i18n/I18nUsageValidatorTest.php
index 0d9306f87..ef8bad1f2 100644
--- a/tests/cli/i18n/I18nUsageValidatorTest.php
+++ b/tests/cli/i18n/I18nUsageValidatorTest.php
@@ -20,13 +20,11 @@ final class I18nUsageValidatorTest extends \PHPUnit\Framework\TestCase {
self::assertSame("There is no data.\n", $validator->displayReport());
$reflectionTotalEntries = new ReflectionProperty(I18nUsageValidator::class, 'totalEntries');
- $reflectionTotalEntries->setAccessible(true);
$reflectionTotalEntries->setValue($validator, 100);
self::assertSame(" 0.0% of translation keys are unused.\n", $validator->displayReport());
$reflectionFailedEntries = new ReflectionProperty(I18nUsageValidator::class, 'failedEntries');
- $reflectionFailedEntries->setAccessible(true);
$reflectionFailedEntries->setValue($validator, 25);
self::assertSame(" 25.0% of translation keys are unused.\n", $validator->displayReport());
diff --git a/tests/cli/i18n/I18nValueTest.php b/tests/cli/i18n/I18nValueTest.php
index 76bdf03d4..01fa68e12 100644
--- a/tests/cli/i18n/I18nValueTest.php
+++ b/tests/cli/i18n/I18nValueTest.php
@@ -58,7 +58,6 @@ final class I18nValueTest extends \PHPUnit\Framework\TestCase {
public static function testStates(): void {
$reflectionProperty = new ReflectionProperty(I18nValue::class, 'state');
- $reflectionProperty->setAccessible(true);
$value = new I18nValue('some value');
self::assertNull($reflectionProperty->getValue($value));