From: addshore Date: Thu, 24 Mar 2016 13:18:38 +0000 (+0000) Subject: Introduce basic SpecialEditWatchlistTest X-Git-Tag: 1.31.0-rc.0~7524^2 X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=commitdiff_plain;h=93d09cf3c2a0dd053a6371221b7d0ec54ca78a18 Introduce basic SpecialEditWatchlistTest Change-Id: I9f765c4183314850169f685abd242e979a79bd68 --- 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( + '