PHP Class Elgg\ActionsServiceTest

Inheritance: extends PHPUnit_Framework_TestCase
Mostrar archivo Open project: elgg/elgg

Public Methods

Method Description
createService ( )
executeForwardUrlDataProvider ( )
invalidActionNamesDataProvider ( )
route ( )
setUp ( )
tearDown ( )
testActionGatekeeper ( )
testActionGatekeeperForLoginAction ( )
testActionHookIsTriggered ( )
testActionReturnValuesAreIgnoredIfNotResponseBuilder ( )
testActionsAccessLevels ( )
testCanCancelAjax2Response ( )
testCanCheckActionNamesForSanity ( $name ) See #9793
testCanDecodeJson ( )
testCanExecute ( )
testCanFilterAjax2Response ( )
testCanFilterResponseBuilder ( )
testCanGenerateValidTokens ( )
testCanNotExecuteActionWithoutActionFile ( )
testCanNotExecuteAdminActionIfNotAdmin ( )
testCanNotExecuteIfActionFileIsMissing ( )
testCanNotExecuteLoggedInActionIfLoggedOut ( )
testCanNotExecuteUnregisteredAction ( )
testCanNotExecuteWithInvalidTokens ( )
testCanNotValidateExpiredToken ( )
testCanNotValidateTokenAfterSessionExpiry ( )
testCanOverrideRegisteredActions ( )
testCanRedirectOnAjax2Request ( )
testCanRedirectOnAjaxRequest ( )
testCanRedirectOnNonAjaxRequest ( )
testCanRefreshTokens ( )
testCanRegisterActionWithUnknownAccessLevel ( )
testCanRegisterActionWithoutFilename ( )
testCanRegisterFilesAsActions ( ) Tests register, exists and unregisrer
testCanResolveForwardUrl ( $url, $expected ) The logic is a bit odd. See #9792
testCanRespondToAjax2Request ( ) This test will implement the flow without triggering ajax forward hook
testCanRespondToAjax2RequestFromErrorResponseBuilderWithErrorStatusCode ( )
testCanRespondToAjax2RequestFromErrorResponseBuilderWithOkStatusCode ( )
testCanRespondToAjax2RequestFromOkResponseBuilder ( )
testCanRespondToAjax2RequestFromRedirectResponseBuilder ( )
testCanRespondToAjaxRequest ( ) This test will implement the flow without triggering ajax forward hook
testCanRespondToAjaxRequestFromErrorResponseBuilder ( )
testCanRespondToAjaxRequestFromOkResponseBuilder ( )
testCanRespondToAjaxRequestFromRedirectResponseBuilder ( )
testCanRespondToNonAjaxRequest ( ) Non-xhr call to an action must always result in a redirect This test will implement the flow without triggering ajax forward hook
testCanRespondToNonAjaxRequestFromErrorResponseBuilder ( )
testCanRespondToNonAjaxRequestFromOkResponseBuilder ( )
testCanRespondToNonAjaxRequestFromRedirectResponseBuilder ( )
testCanRespondWithErrorToAjax2Request ( )
testCanRespondWithErrorToAjaxRequest ( )
testCanRespondWithErrorToNonAjaxRequest ( ) Non-xhr call to an action must always result in a redirect
testCanUnregisterActions ( $actions )
testThrowsExceptionForInvalidAjax2ResponseFilter ( )

Method Details

createService() public method

public createService ( )

executeForwardUrlDataProvider() public method

invalidActionNamesDataProvider() public method

route() public method

public route ( )

setUp() public method

public setUp ( )

tearDown() public method

public tearDown ( )

testActionGatekeeper() public method

testActionGatekeeperForLoginAction() public method

testActionHookIsTriggered() public method

testActionReturnValuesAreIgnoredIfNotResponseBuilder() public method

testActionsAccessLevels() public method

testCanCancelAjax2Response() public method

testCanCheckActionNamesForSanity() public method

See #9793

testCanDecodeJson() public method

public testCanDecodeJson ( )

testCanExecute() public method

public testCanExecute ( )

testCanFilterAjax2Response() public method

testCanFilterResponseBuilder() public method

testCanGenerateValidTokens() public method

testCanNotExecuteActionWithoutActionFile() public method

testCanNotExecuteAdminActionIfNotAdmin() public method

testCanNotExecuteIfActionFileIsMissing() public method

testCanNotExecuteLoggedInActionIfLoggedOut() public method

testCanNotExecuteUnregisteredAction() public method

testCanNotExecuteWithInvalidTokens() public method

testCanNotValidateExpiredToken() public method

testCanNotValidateTokenAfterSessionExpiry() public method

testCanOverrideRegisteredActions() public method

testCanRedirectOnAjax2Request() public method

testCanRedirectOnAjaxRequest() public method

testCanRedirectOnNonAjaxRequest() public method

testCanRefreshTokens() public method

testCanRegisterActionWithUnknownAccessLevel() public method

testCanRegisterActionWithoutFilename() public method

testCanRegisterFilesAsActions() public method

Tests register, exists and unregisrer

testCanResolveForwardUrl() public method

The logic is a bit odd. See #9792
public testCanResolveForwardUrl ( $url, $expected )

testCanRespondToAjax2Request() public method

This test will implement the flow without triggering ajax forward hook

testCanRespondToAjax2RequestFromErrorResponseBuilderWithErrorStatusCode() public method

testCanRespondToAjax2RequestFromErrorResponseBuilderWithOkStatusCode() public method

testCanRespondToAjax2RequestFromOkResponseBuilder() public method

testCanRespondToAjax2RequestFromRedirectResponseBuilder() public method

testCanRespondToAjaxRequest() public method

This test will implement the flow without triggering ajax forward hook

testCanRespondToAjaxRequestFromErrorResponseBuilder() public method

testCanRespondToAjaxRequestFromOkResponseBuilder() public method

testCanRespondToAjaxRequestFromRedirectResponseBuilder() public method

testCanRespondToNonAjaxRequest() public method

Non-xhr call to an action must always result in a redirect This test will implement the flow without triggering ajax forward hook

testCanRespondToNonAjaxRequestFromErrorResponseBuilder() public method

testCanRespondToNonAjaxRequestFromOkResponseBuilder() public method

testCanRespondToNonAjaxRequestFromRedirectResponseBuilder() public method

testCanRespondWithErrorToAjax2Request() public method

testCanRespondWithErrorToAjaxRequest() public method

testCanRespondWithErrorToNonAjaxRequest() public method

Non-xhr call to an action must always result in a redirect

testCanUnregisterActions() public method

public testCanUnregisterActions ( $actions )

testThrowsExceptionForInvalidAjax2ResponseFilter() public method