Merge "Clear token cache when resetting session."
authorAaron Schulz <aschulz@wikimedia.org>
Mon, 24 Sep 2012 16:51:35 +0000 (16:51 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Mon, 24 Sep 2012 16:51:35 +0000 (16:51 +0000)
tests/phpunit/includes/api/ApiTestCase.php

index b84292e..3cec99a 100644 (file)
@@ -18,6 +18,8 @@ abstract class ApiTestCase extends MediaWikiLangTestCase {
                $wgAuth = new StubObject( 'wgAuth', 'AuthPlugin' );
                $wgRequest = new FauxRequest( array() );
 
+               ApiQueryInfo::resetTokenCache(); // tokens are invalid because we cleared the session
+
                self::$users = array(
                        'sysop' => new TestUser(
                                'Apitestsysop',