From a9960b53be48c87c3343e1f2e5c029a5b52e57d4 Mon Sep 17 00:00:00 2001 From: Kunal Mehta Date: Sun, 24 Dec 2017 19:13:51 -0800 Subject: [PATCH] tests: Use checkPHPExtension() instead of re-implementing it Change-Id: I7f5e8684d556befc0aefa302187c573e7a3cff62 --- tests/phpunit/includes/collation/CollationFaTest.php | 4 +--- tests/phpunit/includes/http/HttpTest.php | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/tests/phpunit/includes/collation/CollationFaTest.php b/tests/phpunit/includes/collation/CollationFaTest.php index 178a51cc17..f7455419ad 100644 --- a/tests/phpunit/includes/collation/CollationFaTest.php +++ b/tests/phpunit/includes/collation/CollationFaTest.php @@ -13,9 +13,7 @@ class CollationFaTest extends MediaWikiTestCase { public function setUp() { parent::setUp(); - if ( !extension_loaded( 'intl' ) ) { - $this->markTestSkipped( "PHP extension 'intl' is not loaded, skipping." ); - } + $this->checkPHPExtension( 'intl' ); } /** diff --git a/tests/phpunit/includes/http/HttpTest.php b/tests/phpunit/includes/http/HttpTest.php index 3790e3a1b3..2d73bac548 100644 --- a/tests/phpunit/includes/http/HttpTest.php +++ b/tests/phpunit/includes/http/HttpTest.php @@ -497,9 +497,7 @@ class HttpTest extends MediaWikiTestCase { * @dataProvider provideCurlConstants */ public function testCurlConstants( $value ) { - if ( !extension_loaded( 'curl' ) ) { - $this->markTestSkipped( "PHP extension 'curl' is not loaded, skipping." ); - } + $this->checkPHPExtension( 'curl' ); $this->assertTrue( defined( $value ), $value . ' not defined' ); } -- 2.20.1