From c35b77507e2c0680b14460f19027f942f9fb3aed Mon Sep 17 00:00:00 2001 From: Ori Livneh Date: Thu, 26 Jun 2014 17:39:55 -0700 Subject: [PATCH] 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 --- tests/phpunit/includes/specials/SpecialPreferencesTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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() ) ); } } -- 2.20.1