Skip to content

Commit

Permalink
Remove TODO (#702)
Browse files Browse the repository at this point in the history
  • Loading branch information
theofidry authored Nov 4, 2022
1 parent 0760c02 commit c4a64a1
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions tests/Configuration/ConfigurationKeysTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

use PHPUnit\Framework\TestCase;
use ReflectionClass;
use ReflectionClassConstant;
use function array_values;

/**
Expand All @@ -39,20 +40,18 @@ public function test_keywords_contains_all_the_known_configuration_keys(): void
private static function retrieveConfigurationKeys(): array
{
$configKeysReflection = new ReflectionClass(ConfigurationKeys::class);
// TODO in PHP 8.0 pass ReflectionClassConstant::IS_PUBLIC as a filter
// and rename `$constants` to `$publicConstants`
$constants = $configKeysReflection->getConstants();
$publicConstants = $configKeysReflection->getConstants(ReflectionClassConstant::IS_PUBLIC);

unset($constants['KEYWORDS']);
unset($publicConstants['KEYWORDS']);

foreach ($constants as $name => $value) {
foreach ($publicConstants as $name => $value) {
self::assertNonEmptyStringConstantValue(
$value,
$name,
);
}

return array_values($constants);
return array_values($publicConstants);
}

/**
Expand Down

0 comments on commit c4a64a1

Please sign in to comment.