Skip to content

Commit

Permalink
ParallelLintLintTest::testDeprecated(): fix the test
Browse files Browse the repository at this point in the history
This test is expected to throw a deprecation warning for the PHP4-style class constructor (method named the same as the class).

In PHP 8, the deprecation warning is no longer thrown and PHP4-style constructor method are now treated as _normal_ methods.

This fixes the test to have the correct expectations.
  • Loading branch information
jrfnl authored and grogy committed Dec 27, 2020
1 parent 45ea3b4 commit c247a48
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/ParallelLint.lint.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@ class ParallelLintLintTest extends Tester\TestCase
Assert::false($result->hasSyntaxError());
Assert::equal(0, count($result->getErrors()));

if (PHP_VERSION_ID < 70000) {
Tester\Environment::skip('test for php version > 7.0');
if (PHP_VERSION_ID < 70000 || PHP_VERSION_ID >= 80000 ) {
Tester\Environment::skip('test for php version 7.0-7.4');
}

$parallelLint = new ParallelLint($this->getPhpExecutable());
Expand Down

0 comments on commit c247a48

Please # to comment.