From 595d2e5fd0d779936bb83125c9b4a9b8362062b5 Mon Sep 17 00:00:00 2001 From: Huji Lee Date: Mon, 18 Sep 2017 23:14:00 -0400 Subject: [PATCH] Do not run tests that depend on curl if it is not loaded Bug: T176193 Change-Id: Ia7b9b0196f800eb14463acc2a24df5ac1e48f3ed --- tests/phpunit/includes/http/HttpTest.php | 4 ++++ 1 file changed, 4 insertions(+) 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' ); } } -- 2.20.1