Skip to content

Commit 6b3f163

Browse files
committed
minor #4981 Prevent error in CTTest::testConstants (for PHP8) (guilliamxavier)
This PR was merged into the 2.15 branch. Discussion ---------- Prevent error in CTTest::testConstants (for PHP8) Noticed in https://travis-ci.org/github/FriendsOfPHP/PHP-CS-Fixer/jobs/692842752#L800 Even before PHP 8, I find the test cleaner like this Commits ------- 1a121e0 Prevent error in CTTest::testConstants (for PHP8)
2 parents ac59950 + 1a121e0 commit 6b3f163

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/Tokenizer/CTTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public function testGetNameNotExists()
7474
public function testConstants($name, $value)
7575
{
7676
static::assertGreaterThan(10000, $value);
77-
static::assertNull(@\constant($name), 'The CT name must not use native T_* name.');
77+
static::assertFalse(\defined($name), 'The CT name must not use native T_* name.');
7878
}
7979

8080
public function provideConstantsCases()

0 commit comments

Comments
 (0)