public function testRequireLoginNotAnon() { $specialPage = new SpecialPage('Watchlist', 'viewmywatchlist'); $user = User::newFromName("UTSysop"); $specialPage->getContext()->setUser($user); $specialPage->requireLogin(); // no exception thrown, logged in use can access special page $this->assertTrue(true); }