From 2cc67ee42d091e4476be57ae34fef5f6c2ff55f4 Mon Sep 17 00:00:00 2001 From: Umherirrender Date: Thu, 14 Sep 2017 21:01:11 +0200 Subject: [PATCH] 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 --- tests/phpunit/suites/ParserTestFileSuite.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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'] ); + } } } -- 2.20.1