X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=tests%2Fphpunit%2Fincludes%2Fhttp%2FHttpTest.php;h=1e685bd500a2e3f8209458a63d8e1e41e2ac1c4d;hp=3790e3a1b357012b226bf816169766c70a193efd;hb=449e31a179e337edbc205262bb29476c901d19c5;hpb=5120937028f768749d058aa91dde82a96de0af1c diff --git a/tests/phpunit/includes/http/HttpTest.php b/tests/phpunit/includes/http/HttpTest.php index 3790e3a1b3..1e685bd500 100644 --- a/tests/phpunit/includes/http/HttpTest.php +++ b/tests/phpunit/includes/http/HttpTest.php @@ -495,11 +495,10 @@ class HttpTest extends MediaWikiTestCase { * where it did not define a cURL constant. T72570 * * @dataProvider provideCurlConstants + * @coversNothing */ 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' ); } @@ -511,7 +510,7 @@ class HttpTest extends MediaWikiTestCase { class MWHttpRequestTester extends MWHttpRequest { // function derived from the MWHttpRequest factory function but // returns appropriate tester class here - public static function factory( $url, $options = null, $caller = __METHOD__ ) { + public static function factory( $url, array $options = null, $caller = __METHOD__ ) { if ( !Http::$httpEngine ) { Http::$httpEngine = function_exists( 'curl_init' ) ? 'curl' : 'php'; } elseif ( Http::$httpEngine == 'curl' && !function_exists( 'curl_init' ) ) {