8 * @covers SpecialWatchlist
10 class SpecialWatchlistTest
extends SpecialPageTestBase
{
13 * Returns a new instance of the special page under test.
17 protected function newSpecialPage() {
18 return new SpecialWatchlist();
21 public function testNotLoggedIn_throwsException() {
22 $this->setExpectedException( 'UserNotLoggedIn' );
23 $this->executeSpecialPage();
26 public function testUserWithNoWatchedItems_displaysNoWatchlistMessage() {
27 $user = new TestUser( __METHOD__
);
28 list( $html, ) = $this->executeSpecialPage( '', null, 'qqx', $user->getUser() );
29 $this->assertContains( '(nowatchlist)', $html );