From 48fd22b1d02a563ba067f7757ea5d14bd5d64bef Mon Sep 17 00:00:00 2001 From: addshore Date: Thu, 24 Mar 2016 13:11:07 +0000 Subject: [PATCH] Introduce basic SpecialWatchlistTest Change-Id: I98a2ad112189a09581a0564da3c3357939a5d7de --- .../specials/SpecialWatchlistTest.php | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 tests/phpunit/includes/specials/SpecialWatchlistTest.php diff --git a/tests/phpunit/includes/specials/SpecialWatchlistTest.php b/tests/phpunit/includes/specials/SpecialWatchlistTest.php new file mode 100644 index 0000000000..6e702b637c --- /dev/null +++ b/tests/phpunit/includes/specials/SpecialWatchlistTest.php @@ -0,0 +1,32 @@ +setExpectedException( 'UserNotLoggedIn' ); + $this->executeSpecialPage(); + } + + public function testUserWithNoWatchedItems_displaysNoWatchlistMessage() { + $user = new TestUser( __METHOD__ ); + list( $html, ) = $this->executeSpecialPage( '', null, 'qqx', $user->getUser() ); + $this->assertContains( '(nowatchlist)', $html ); + } + +} -- 2.20.1