From: Ori Livneh Date: Fri, 27 Jun 2014 00:39:55 +0000 (-0700) Subject: Make SpecialPreferencesTest::testBug41337 non-risky X-Git-Tag: 1.31.0-rc.0~15206^2 X-Git-Url: https://git.heureux-cyclage.org/?a=commitdiff_plain;h=c35b77507e2c0680b14460f19027f942f9fb3aed;p=lhc%2Fweb%2Fwiklou.git Make SpecialPreferencesTest::testBug41337 non-risky PHPUnit treats tests that make no assertions as "risky" because they make it difficult to distinguish successful test runs from programmer error. To make SpecialPreferencesTest::testBug41337 non-risky, assert that the execute method returns null. Change-Id: I4c199d2b81037e6ca2b2862418c4f8a8352c777e --- diff --git a/tests/phpunit/includes/specials/SpecialPreferencesTest.php b/tests/phpunit/includes/specials/SpecialPreferencesTest.php index ea2d28cc01..4f6c4116aa 100644 --- a/tests/phpunit/includes/specials/SpecialPreferencesTest.php +++ b/tests/phpunit/includes/specials/SpecialPreferencesTest.php @@ -51,7 +51,7 @@ class SpecialPreferencesTest extends MediaWikiTestCase { # Do the call, should not spurt a fatal error. $special = new SpecialPreferences(); $special->setContext( $context ); - $special->execute( array() ); + $this->assertNull( $special->execute( array() ) ); } }