From 93d09cf3c2a0dd053a6371221b7d0ec54ca78a18 Mon Sep 17 00:00:00 2001 From: addshore Date: Thu, 24 Mar 2016 13:18:38 +0000 Subject: [PATCH] Introduce basic SpecialEditWatchlistTest Change-Id: I9f765c4183314850169f685abd242e979a79bd68 --- .../specials/SpecialEditWatchlistTest.php | 50 +++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 tests/phpunit/includes/specials/SpecialEditWatchlistTest.php diff --git a/tests/phpunit/includes/specials/SpecialEditWatchlistTest.php b/tests/phpunit/includes/specials/SpecialEditWatchlistTest.php new file mode 100644 index 0000000000..cd84d7990f --- /dev/null +++ b/tests/phpunit/includes/specials/SpecialEditWatchlistTest.php @@ -0,0 +1,50 @@ +setExpectedException( 'UserNotLoggedIn' ); + $this->executeSpecialPage(); + } + + public function testRootPage_displaysExplanationMessage() { + $user = new TestUser( __METHOD__ ); + list( $html, ) = $this->executeSpecialPage( '', null, 'qqx', $user->getUser() ); + $this->assertContains( '(watchlistedit-normal-explain)', $html ); + } + + public function testClearPage_hasClearButtonForm() { + $user = new TestUser( __METHOD__ ); + list( $html, ) = $this->executeSpecialPage( 'clear', null, 'qqx', $user->getUser() ); + $this->assertRegExp( + '/
/', + $html + ); + } + + public function testEditRawPage_hasTitlesBox() { + $user = new TestUser( __METHOD__ ); + list( $html, ) = $this->executeSpecialPage( 'raw', null, 'qqx', $user->getUser() ); + $this->assertContains( + '