rdbms: Rename "memCache" to "memStash" in LBFactory
[mediawiki.git] / tests / phpunit / includes / specials / SpecialEditWatchlistTest.php
blobab3ac55324adf10c9a59f0f208b7e9111ba5e91b
1 <?php
3 /**
4 * @author Addshore
6 * @group Database
8 * @covers SpecialEditWatchlist
9 */
10 class SpecialEditWatchlistTest extends SpecialPageTestBase {
12 /**
13 * Returns a new instance of the special page under test.
15 * @return SpecialPage
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() );
35 $this->assertRegExp(
36 '/<form class="mw-htmlform" action=".*?Special:EditWatchlist\/clear" method="post">/',
37 $html
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"',
46 $html