[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Do not run tests that depend on curl if it is not loaded

2017-09-19 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/378837 )

Change subject: Do not run tests that depend on curl if it is not loaded
..


Do not run tests that depend on curl if it is not loaded

Bug: T176193
Change-Id: Ia7b9b0196f800eb14463acc2a24df5ac1e48f3ed
---
M tests/phpunit/includes/http/HttpTest.php
1 file changed, 4 insertions(+), 0 deletions(-)

Approvals:
  Legoktm: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/tests/phpunit/includes/http/HttpTest.php 
b/tests/phpunit/includes/http/HttpTest.php
index 3693a27..3790e3a 100644
--- a/tests/phpunit/includes/http/HttpTest.php
+++ b/tests/phpunit/includes/http/HttpTest.php
@@ -497,6 +497,10 @@
 * @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' );
}
 }

-- 
To view, visit https://gerrit.wikimedia.org/r/378837
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia7b9b0196f800eb14463acc2a24df5ac1e48f3ed
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Huji 
Gerrit-Reviewer: Bartosz DziewoƄski 
Gerrit-Reviewer: Brian Wolff 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Do not run tests that depend on curl if it is not loaded

2017-09-18 Thread Huji (Code Review)
Huji has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/378837 )

Change subject: Do not run tests that depend on curl if it is not loaded
..

Do not run tests that depend on curl if it is not loaded

Bug: T176193
Change-Id: Ia7b9b0196f800eb14463acc2a24df5ac1e48f3ed
---
M tests/phpunit/includes/http/HttpTest.php
1 file changed, 7 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/37/378837/1

diff --git a/tests/phpunit/includes/http/HttpTest.php 
b/tests/phpunit/includes/http/HttpTest.php
index 3693a27..fdee40f 100644
--- a/tests/phpunit/includes/http/HttpTest.php
+++ b/tests/phpunit/includes/http/HttpTest.php
@@ -4,6 +4,13 @@
  * @group Http
  */
 class HttpTest extends MediaWikiTestCase {
+   public function setUp() {
+   parent::setUp();
+   if ( !extension_loaded( 'curl' ) ) {
+   $this->markTestSkipped( "PHP extension 'curl' is not 
loaded, skipping." );
+   }
+   }
+
/**
 * @dataProvider cookieDomains
 * @covers Cookie::validateCookieDomain

-- 
To view, visit https://gerrit.wikimedia.org/r/378837
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia7b9b0196f800eb14463acc2a24df5ac1e48f3ed
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Huji 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits