From: Umherirrender Date: Thu, 14 Sep 2017 19:01:11 +0000 (+0200) Subject: Check requirements for parser test suite in phpunit tests X-Git-Tag: 1.31.0-rc.0~1914^2 X-Git-Url: https://git.cyclocoop.org/%7B%24admin_url%7Dmembres/%24wgLogo?a=commitdiff_plain;h=2cc67ee42d091e4476be57ae34fef5f6c2ff55f4;p=lhc%2Fweb%2Fwiklou.git Check requirements for parser test suite in phpunit tests There was a different between parserTests.php and phpunit.php for parser tests, missing hooks are failing on phpunit, not skipping Fixed that Change-Id: If6cdab2ec793895db566d9389edc1444a4fe25b0 --- diff --git a/tests/phpunit/suites/ParserTestFileSuite.php b/tests/phpunit/suites/ParserTestFileSuite.php index dbee8947f9..b72d8b84e3 100644 --- a/tests/phpunit/suites/ParserTestFileSuite.php +++ b/tests/phpunit/suites/ParserTestFileSuite.php @@ -23,6 +23,10 @@ class ParserTestFileSuite extends PHPUnit_Framework_TestSuite { } function setUp() { - $this->ptRunner->addArticles( $this->ptFileInfo[ 'articles'] ); + if ( !$this->ptRunner->meetsRequirements( $this->ptFileInfo['requirements'] ) ) { + $this->markTestSuiteSkipped( 'required extension not enabled' ); + } else { + $this->ptRunner->addArticles( $this->ptFileInfo[ 'articles'] ); + } } }