8 * @covers SpecialEditWatchlist
10 class SpecialEditWatchlistTest
extends SpecialPageTestBase
{
13 * Returns a new instance of the special page under test.
17 protected function newSpecialPage() {
18 return new SpecialEditWatchlist();
21 public function testNotLoggedIn_throwsException() {
22 $this->setExpectedException( 'UserNotLoggedIn' );
23 $this->executeSpecialPage();
26 public function testRootPage_displaysExplanationMessage() {
27 $user = new TestUser( __METHOD__
);
28 list( $html, ) = $this->executeSpecialPage( '', null, 'qqx', $user->getUser() );
29 $this->assertContains( '(watchlistedit-normal-explain)', $html );
32 public function testClearPage_hasClearButtonForm() {
33 $user = new TestUser( __METHOD__
);
34 list( $html, ) = $this->executeSpecialPage( 'clear', null, 'qqx', $user->getUser() );
36 '/<form class="mw-htmlform" action=".*?Special:EditWatchlist\/clear" method="post">/',
41 public function testEditRawPage_hasTitlesBox() {
42 $user = new TestUser( __METHOD__
);
43 list( $html, ) = $this->executeSpecialPage( 'raw', null, 'qqx', $user->getUser() );
44 $this->assertContains(
45 '<textarea id="mw-input-wpTitles"',