Make SpecialPreferencesTest::testBug41337 non-risky
authorOri Livneh <ori@wikimedia.org>
Fri, 27 Jun 2014 00:39:55 +0000 (17:39 -0700)
committerOri Livneh <ori@wikimedia.org>
Fri, 27 Jun 2014 00:48:55 +0000 (17:48 -0700)
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

index ea2d28c..4f6c411 100644 (file)
@@ -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() ) );
        }
 
 }