From: Huji Lee Date: Tue, 19 Sep 2017 03:14:00 +0000 (-0400) Subject: Do not run tests that depend on curl if it is not loaded X-Git-Tag: 1.31.0-rc.0~2027^2 X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dmembres/cotisations/gestion/rappel_supprimer.php?a=commitdiff_plain;h=595d2e5fd0d779936bb83125c9b4a9b8362062b5;p=lhc%2Fweb%2Fwiklou.git Do not run tests that depend on curl if it is not loaded Bug: T176193 Change-Id: Ia7b9b0196f800eb14463acc2a24df5ac1e48f3ed --- diff --git a/tests/phpunit/includes/http/HttpTest.php b/tests/phpunit/includes/http/HttpTest.php index 3693a277a1..3790e3a1b3 100644 --- a/tests/phpunit/includes/http/HttpTest.php +++ b/tests/phpunit/includes/http/HttpTest.php @@ -497,6 +497,10 @@ class HttpTest extends MediaWikiTestCase { * @dataProvider provideCurlConstants */ public function testCurlConstants( $value ) { + if ( !extension_loaded( 'curl' ) ) { + $this->markTestSkipped( "PHP extension 'curl' is not loaded, skipping." ); + } + $this->assertTrue( defined( $value ), $value . ' not defined' ); } }