testInvalidEmail() passes now without local config
authorPlatonides <platonides@gmail.com>
Sat, 9 Feb 2013 18:57:03 +0000 (19:57 +0100)
committerPlatonides <platonides@gmail.com>
Fri, 1 Mar 2013 21:50:59 +0000 (22:50 +0100)
ApiAccountCreationTest::testInvalidEmail() no longer
needs LocalSettings to have $wgEnableEmail = true;

Change-Id: I97803be116fda8194e46fe0021c7b32d7b703b1d

tests/phpunit/includes/api/ApiAccountCreationTest.php

index f37e279..94082e5 100644 (file)
@@ -9,6 +9,7 @@ class ApiCreateAccountTest extends ApiTestCase {
        function setUp() {
                parent::setUp();
                LoginForm::setCreateaccountToken();
+               $this->setMwGlobals( array( 'wgEnableEmail' => true ) );
        }
 
        /**
@@ -141,10 +142,6 @@ class ApiCreateAccountTest extends ApiTestCase {
         * @expectedException UsageException
         */
        function testInvalidEmail() {
-               global $wgEnableEmail;
-               if ( !$wgEnableEmail ) {
-                       $this->markTestSkipped( 'email is not enabled, so createaccount does not check it' );
-               }
                $this->doApiRequest( array(
                        'action' => 'createaccount',
                        'name' => 'Test User',