From: Kunal Mehta Date: Mon, 25 Dec 2017 03:13:51 +0000 (-0800) Subject: tests: Use checkPHPExtension() instead of re-implementing it X-Git-Tag: 1.31.0-rc.0~1102 X-Git-Url: http://git.cyclocoop.org/%22.htmlspecialchars%28%24url_syndic%29.%22?a=commitdiff_plain;h=a9960b53be48c87c3343e1f2e5c029a5b52e57d4;p=lhc%2Fweb%2Fwiklou.git tests: Use checkPHPExtension() instead of re-implementing it Change-Id: I7f5e8684d556befc0aefa302187c573e7a3cff62 --- 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' ); }