Page MenuHomePhabricator

Running PHPUnit on includes/ or includes/parser/ results in "Call to a member function staticSetup() on null"
Closed, ResolvedPublic


ParserIntegrationTest has a constructor with mandatory parameters. PHPUnit wants to run it, but constructs it with no parameters, which results in a long list of notices and two failed tests. tests/phpunit/suite.xml seems to try to tell PHPUnit not to run it, but when I do

php tests/phpunit/phpunit.php tests/phpunit/includes/parser/


php tests/phpunit/phpunit.php tests/phpunit/includes/

it gets run anyway.

Is there some fix we could make to the suite.xml file? Or maybe rename it to not end in "Test" so PHPUnit ignores it by itself?

Event Timeline

Change 451641 had a related patch set uploaded (by simetrical; owner: simetrical):
[mediawiki/core@master] Only use "*Test.php" for actual PHPUnit tests

Change 451641 merged by jenkins-bot:
[mediawiki/core@master] Only use "*Test.php" for actual PHPUnit tests

Krinkle moved this task from PHPUnit to QUnit on the MediaWiki-Core-Tests board.
Krinkle moved this task from QUnit to PHPUnit on the MediaWiki-Core-Tests board.
Simetrical claimed this task.

Seems fixed.