Update docs/hooks.txt for ShowSearchHitTitle
[mediawiki.git] / tests / phpunit / includes / specials / SpecialWatchlistTest.php
blob6e702b637cc9913aae76867e9abfaf9d712bb535
1 <?php
3 /**
4 * @author Addshore
6 * @group Database
8 * @covers SpecialWatchlist
9 */
10 class SpecialWatchlistTest extends SpecialPageTestBase {
12 /**
13 * Returns a new instance of the special page under test.
15 * @return SpecialPage
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 );