MediaWiki  master
WatchActionTest Class Reference

WatchAction. More...

Inheritance diagram for WatchActionTest:
Collaboration diagram for WatchActionTest:

Public Member Functions

 testDoesWrites ()
 WatchAction::doesWrites() More...
 
 testDoUnWatchCallsUserRemoveWatch ()
 WatchAction::doUnWatch() More...
 
 testDoUnWatchUserHookAborted ()
 WatchAction::doUnWatch() More...
 
 testDoUnWatchWithoutRights ()
 WatchAction::doUnWatch() More...
 
 testDoWatchCallsUserAddWatch ()
 WatchAction::doWatch() More...
 
 testDoWatchNoCheckRights ()
 WatchAction::doWatch() More...
 
 testDoWatchOrUnwatchSkipsIfAlreadyUnWatched ()
 WatchAction::doWatchOrUnwatch() More...
 
 testDoWatchOrUnwatchSkipsIfAlreadyWatched ()
 WatchAction::doWatchOrUnwatch() More...
 
 testDoWatchOrUnwatchUnwatchesIfUnwatch ()
 WatchAction::doWatchOrUnwatch() More...
 
 testDoWatchOrUnwatchUserNotLoggedIn ()
 WatchAction::doWatchOrUnwatch() More...
 
 testDoWatchOrUnwatchWatchesIfWatch ()
 WatchAction::doWatchOrUnwatch() More...
 
 testDoWatchUserNotPermittedStatusNotGood ()
 WatchAction::doWatch() More...
 
 testGetName ()
 WatchAction::getName() More...
 
 testGetWatchTokenNormalizesToWatch ()
 WatchAction::getWatchToken() More...
 
 testGetWatchTokenProxiesUserGetEditToken ()
 WatchAction::getWatchToken() More...
 
 testOnSubmit ()
 WatchAction::onSubmit() WatchAction::doWatch() More...
 
 testOnSubmitHookAborted ()
 WatchAction::onSubmit() WatchAction::doWatch() More...
 
 testOnSuccessMainNamespaceTitle ()
 WatchAction::onSuccess() More...
 
 testOnSuccessTalkPage ()
 WatchAction::onSuccess() More...
 
 testRequiresUnlock ()
 WatchAction::requiresUnblock() More...
 
 testShowUserLoggedInNoException ()
 WatchAction::checkCanExecute() More...
 
 testShowUserNotLoggedIn ()
 WatchAction::checkCanExecute() More...
 

Protected Member Functions

 setUp ()
 
 tearDown ()
 

Private Member Functions

 getLoggedInIsWatchedUser ( $isLoggedIn=true, $isWatched=true)
 

Private Attributes

WikiPage $testWikiPage
 
WatchAction $watchAction
 

Detailed Description

WatchAction.

Action

Definition at line 8 of file WatchActionTest.php.

Member Function Documentation

◆ getLoggedInIsWatchedUser()

WatchActionTest::getLoggedInIsWatchedUser (   $isLoggedIn = true,
  $isWatched = true 
)
private
Parameters
bool$isLoggedInWhether the user should be "marked" as logged in
bool$isWatchedThe value any call to isWatched should return
Returns
PHPUnit_Framework_MockObject_MockObject

Definition at line 348 of file WatchActionTest.php.

References $user, and class.

Referenced by testDoWatchOrUnwatchSkipsIfAlreadyUnWatched(), testDoWatchOrUnwatchSkipsIfAlreadyWatched(), testDoWatchOrUnwatchUnwatchesIfUnwatch(), testDoWatchOrUnwatchUserNotLoggedIn(), and testDoWatchOrUnwatchWatchesIfWatch().

◆ setUp()

WatchActionTest::setUp ( )
protected

Definition at line 20 of file WatchActionTest.php.

References RequestContext\getMain(), and Title\newFromText().

◆ tearDown()

WatchActionTest::tearDown ( )
protected
Exceptions
MWException

Definition at line 33 of file WatchActionTest.php.

References Hooks\clear().

◆ testDoesWrites()

WatchActionTest::testDoesWrites ( )

WatchAction::doesWrites()

Definition at line 57 of file WatchActionTest.php.

◆ testDoUnWatchCallsUserRemoveWatch()

WatchActionTest::testDoUnWatchCallsUserRemoveWatch ( )

WatchAction::doUnWatch()

Definition at line 239 of file WatchActionTest.php.

References class.

◆ testDoUnWatchUserHookAborted()

WatchActionTest::testDoUnWatchUserHookAborted ( )

WatchAction::doUnWatch()

Definition at line 221 of file WatchActionTest.php.

References class, and Hooks\register().

◆ testDoUnWatchWithoutRights()

WatchActionTest::testDoUnWatchWithoutRights ( )

WatchAction::doUnWatch()

Definition at line 209 of file WatchActionTest.php.

References class.

◆ testDoWatchCallsUserAddWatch()

WatchActionTest::testDoWatchCallsUserAddWatch ( )

WatchAction::doWatch()

Definition at line 194 of file WatchActionTest.php.

References class, and WatchAction\doWatch().

◆ testDoWatchNoCheckRights()

WatchActionTest::testDoWatchNoCheckRights ( )

WatchAction::doWatch()

Definition at line 170 of file WatchActionTest.php.

References class, WatchAction\doWatch(), and false.

◆ testDoWatchOrUnwatchSkipsIfAlreadyUnWatched()

WatchActionTest::testDoWatchOrUnwatchSkipsIfAlreadyUnWatched ( )

◆ testDoWatchOrUnwatchSkipsIfAlreadyWatched()

WatchActionTest::testDoWatchOrUnwatchSkipsIfAlreadyWatched ( )

◆ testDoWatchOrUnwatchUnwatchesIfUnwatch()

WatchActionTest::testDoWatchOrUnwatchUnwatchesIfUnwatch ( )

◆ testDoWatchOrUnwatchUserNotLoggedIn()

WatchActionTest::testDoWatchOrUnwatchUserNotLoggedIn ( )

◆ testDoWatchOrUnwatchWatchesIfWatch()

WatchActionTest::testDoWatchOrUnwatchWatchesIfWatch ( )

◆ testDoWatchUserNotPermittedStatusNotGood()

WatchActionTest::testDoWatchUserNotPermittedStatusNotGood ( )

WatchAction::doWatch()

Definition at line 182 of file WatchActionTest.php.

References class, WatchAction\doWatch(), and true.

◆ testGetName()

WatchActionTest::testGetName ( )

WatchAction::getName()

Definition at line 43 of file WatchActionTest.php.

◆ testGetWatchTokenNormalizesToWatch()

WatchActionTest::testGetWatchTokenNormalizesToWatch ( )

◆ testGetWatchTokenProxiesUserGetEditToken()

WatchActionTest::testGetWatchTokenProxiesUserGetEditToken ( )

◆ testOnSubmit()

WatchActionTest::testOnSubmit ( )

◆ testOnSubmitHookAborted()

WatchActionTest::testOnSubmitHookAborted ( )

◆ testOnSuccessMainNamespaceTitle()

WatchActionTest::testOnSuccessMainNamespaceTitle ( )

WatchAction::onSuccess()

Definition at line 124 of file WatchActionTest.php.

References class, and WatchAction\onSuccess().

◆ testOnSuccessTalkPage()

WatchActionTest::testOnSuccessTalkPage ( )

◆ testRequiresUnlock()

WatchActionTest::testRequiresUnlock ( )

◆ testShowUserLoggedInNoException()

WatchActionTest::testShowUserLoggedInNoException ( )

◆ testShowUserNotLoggedIn()

WatchActionTest::testShowUserNotLoggedIn ( )

Member Data Documentation

◆ $testWikiPage

WikiPage WatchActionTest::$testWikiPage
private

Definition at line 18 of file WatchActionTest.php.

◆ $watchAction

WatchAction WatchActionTest::$watchAction
private

Definition at line 13 of file WatchActionTest.php.


The documentation for this class was generated from the following file: