Addshore has uploaded a new change for review. https://gerrit.wikimedia.org/r/279353
Change subject: Introduce basic SpecialWatchlistTest ...................................................................... Introduce basic SpecialWatchlistTest Change-Id: I98a2ad112189a09581a0564da3c3357939a5d7de --- A tests/phpunit/includes/specials/SpecialWatchlistTest.php 1 file changed, 32 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/53/279353/1 diff --git a/tests/phpunit/includes/specials/SpecialWatchlistTest.php b/tests/phpunit/includes/specials/SpecialWatchlistTest.php new file mode 100644 index 0000000..25afe6d --- /dev/null +++ b/tests/phpunit/includes/specials/SpecialWatchlistTest.php @@ -0,0 +1,32 @@ +<?php + +/** + * @author Addshore + * + * @group Database + * + * @covers SpecialWatchlist + */ +class SpecialWatchlistTest extends SpecialPageTestBase { + + /** + * Returns a new instance of the special page under test. + * + * @return SpecialPage + */ + protected function newSpecialPage() { + return new SpecialWatchlist(); + } + + public function testNotLoggedIn_throwsException() { + $this->setExpectedException( 'UserNotLoggedIn' ); + $this->executeSpecialPage(); + } + + public function testUserWithNoWatchedItems_displaysNoWatchlistMessage() { + $user = new TestUser( __METHOD__ ); + list( $html, ) = $this->executeSpecialPage( '', null, 'qqx', $user->getUser() ); + $this->assertContains( '(nowatchlist)', $html ); + } + +} \ No newline at end of file -- To view, visit https://gerrit.wikimedia.org/r/279353 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I98a2ad112189a09581a0564da3c3357939a5d7de Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Addshore <addshorew...@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits