PHP Class Elgg\RouterTest

Inheritance: extends TestCase
Afficher le fichier Open project: elgg/elgg

Protected Properties

Свойство Type Description
$fooHandlerCalls integer
$hooks PluginHooksService
$pages string
$request Elgg\Http\Request
$router Router
$translator Elgg\I18n\Translator
$viewsDir string

Méthodes publiques

Méthode Description
bar_route_handler ( $hook, $type, $value, $params )
bar_route_identifier ( $hook, $type, $value, $params )
bar_route_override ( $hook, $type, $value, $params )
createService ( )
foo_page_handler ( )
hello_page_handler ( $segments, $identifier )
route ( )
setUp ( )
tearDown ( )
testCanAllowRewrite ( )
testCanFilterResponse ( )
testCanFilterResponseToAjax2ViewRequestForARegisteredFormView ( )
testCanFilterResponseToAjax2ViewRequestForARegisteredView ( )
testCanFilterResponseToAjaxViewRequestForARegisteredFormView ( )
testCanFilterResponseToAjaxViewRequestForARegisteredView ( )
testCanRedirectAjax2RequestFromRouteHook ( )
testCanRedirectAjaxRequestFromRouteHook ( )
testCanRedirectNonAjaxRequestFromRouteHook ( )
testCanRegisterFunctionsAsPageHandlers ( )
testCanRespondToAjax2RequestForPageThatForwards ( )
testCanRespondToAjax2RequestForPageThatForwardsToErrorPage ( )
testCanRespondToAjax2RequestFromErrorResponseBuilder ( )
testCanRespondToAjax2RequestFromOkResponseBuilder ( )
testCanRespondToAjax2RequestFromRedirectResponseBuilder ( )
testCanRespondToAjax2RequestInNonDefaultViewtype ( )
testCanRespondToAjax2RequestThroughRouteHook ( )
testCanRespondToAjax2ViewRequestForARegisteredFormView ( )
testCanRespondToAjax2ViewRequestForARegisteredView ( )
testCanRespondToAjax2ViewRequestForARegisteredViewWhichForwards ( )
testCanRespondToAjax2ViewRequestForCSS ( )
testCanRespondToAjax2ViewRequestForCacheableView ( )
testCanRespondToAjax2ViewRequestForJS ( )
testCanRespondToAjaxRequestForPageThatForwards ( )
testCanRespondToAjaxRequestForPageThatForwardsToErrorPage ( )
testCanRespondToAjaxRequestFromErrorResponseBuilder ( )
testCanRespondToAjaxRequestFromOkResponseBuilder ( )
testCanRespondToAjaxRequestFromRedirectResponseBuilder ( )
testCanRespondToAjaxRequestInNonDefaultViewtype ( )
testCanRespondToAjaxRequestThroughRouteHook ( )
testCanRespondToAjaxViewRequestForARegisteredFormView ( )
testCanRespondToAjaxViewRequestForARegisteredView ( )
testCanRespondToAjaxViewRequestForARegisteredViewWhichForwards ( )
testCanRespondToAjaxViewRequestForCSS ( )
testCanRespondToAjaxViewRequestForCacheableView ( )
testCanRespondToAjaxViewRequestForJS ( )
testCanRespondToNonAjaxRequestForPageThatForwards ( )
testCanRespondToNonAjaxRequestForPageThatForwardsToErrorPage ( )
testCanRespondToNonAjaxRequestFromErrorResponseBuilder ( )
testCanRespondToNonAjaxRequestFromOkResponseBuilder ( )
testCanRespondToNonAjaxRequestFromRedirectResponseBuilder ( )
testCanRespondToNonAjaxRequestInNonDefaultViewtype ( )
testCanRespondToNonAjaxRequestThroughRouteHook ( )
testCanRespondToUnregisteredRoute ( ) See #9796
testCanRespondWithErrorToAjax2ViewRequestForUnallowedView ( )
testCanRespondWithErrorToAjaxViewRequestForUnallowedView ( )
testCanSafelyRedirectWithinRedirect ( )
testCanUnregisterPageHandlers ( )
testFailToRegisterInvalidCallback ( )
testRespondsWithErrorToNonAjaxRequestForAjaxView ( )
testRouteOverridenFromHook ( )
testRouteSupportsSettingHandlerInHookResultForBackwardsCompatibility ( ) 1. Register a page handler for /foo 2. Register a plugin hook that uses the "handler" result param to route all /bar/* requests to the /foo handler.
testRouteSupportsSettingIdentifierInHookResultForBackwardsCompatibility ( ) 1. Register a page handler for /foo 2. Register a plugin hook that uses the "handler" result param to route all /bar/* requests to the /foo handler.

Method Details

bar_route_handler() public méthode

public bar_route_handler ( $hook, $type, $value, $params )

bar_route_identifier() public méthode

public bar_route_identifier ( $hook, $type, $value, $params )

bar_route_override() public méthode

public bar_route_override ( $hook, $type, $value, $params )

createService() public méthode

public createService ( )

foo_page_handler() public méthode

public foo_page_handler ( )

hello_page_handler() public méthode

public hello_page_handler ( $segments, $identifier )

route() public méthode

public route ( )

setUp() public méthode

public setUp ( )

tearDown() public méthode

public tearDown ( )

testCanAllowRewrite() public méthode

public testCanAllowRewrite ( )

testCanFilterResponse() public méthode

testCanFilterResponseToAjax2ViewRequestForARegisteredFormView() public méthode

testCanFilterResponseToAjax2ViewRequestForARegisteredView() public méthode

testCanFilterResponseToAjaxViewRequestForARegisteredFormView() public méthode

testCanFilterResponseToAjaxViewRequestForARegisteredView() public méthode

testCanRedirectAjax2RequestFromRouteHook() public méthode

testCanRedirectAjaxRequestFromRouteHook() public méthode

testCanRedirectNonAjaxRequestFromRouteHook() public méthode

testCanRegisterFunctionsAsPageHandlers() public méthode

testCanRespondToAjax2RequestForPageThatForwards() public méthode

testCanRespondToAjax2RequestForPageThatForwardsToErrorPage() public méthode

testCanRespondToAjax2RequestFromErrorResponseBuilder() public méthode

testCanRespondToAjax2RequestFromOkResponseBuilder() public méthode

testCanRespondToAjax2RequestFromRedirectResponseBuilder() public méthode

testCanRespondToAjax2RequestInNonDefaultViewtype() public méthode

testCanRespondToAjax2RequestThroughRouteHook() public méthode

testCanRespondToAjax2ViewRequestForARegisteredFormView() public méthode

testCanRespondToAjax2ViewRequestForARegisteredView() public méthode

testCanRespondToAjax2ViewRequestForARegisteredViewWhichForwards() public méthode

testCanRespondToAjax2ViewRequestForCSS() public méthode

testCanRespondToAjax2ViewRequestForCacheableView() public méthode

testCanRespondToAjax2ViewRequestForJS() public méthode

testCanRespondToAjaxRequestForPageThatForwards() public méthode

testCanRespondToAjaxRequestForPageThatForwardsToErrorPage() public méthode

testCanRespondToAjaxRequestFromErrorResponseBuilder() public méthode

testCanRespondToAjaxRequestFromOkResponseBuilder() public méthode

testCanRespondToAjaxRequestFromRedirectResponseBuilder() public méthode

testCanRespondToAjaxRequestInNonDefaultViewtype() public méthode

testCanRespondToAjaxRequestThroughRouteHook() public méthode

testCanRespondToAjaxViewRequestForARegisteredFormView() public méthode

testCanRespondToAjaxViewRequestForARegisteredView() public méthode

testCanRespondToAjaxViewRequestForARegisteredViewWhichForwards() public méthode

testCanRespondToAjaxViewRequestForCSS() public méthode

testCanRespondToAjaxViewRequestForCacheableView() public méthode

testCanRespondToAjaxViewRequestForJS() public méthode

testCanRespondToNonAjaxRequestForPageThatForwards() public méthode

testCanRespondToNonAjaxRequestForPageThatForwardsToErrorPage() public méthode

testCanRespondToNonAjaxRequestFromErrorResponseBuilder() public méthode

testCanRespondToNonAjaxRequestFromOkResponseBuilder() public méthode

testCanRespondToNonAjaxRequestFromRedirectResponseBuilder() public méthode

testCanRespondToNonAjaxRequestInNonDefaultViewtype() public méthode

testCanRespondToNonAjaxRequestThroughRouteHook() public méthode

testCanRespondToUnregisteredRoute() public méthode

See #9796

testCanRespondWithErrorToAjax2ViewRequestForUnallowedView() public méthode

testCanRespondWithErrorToAjaxViewRequestForUnallowedView() public méthode

testCanSafelyRedirectWithinRedirect() public méthode

testCanUnregisterPageHandlers() public méthode

testFailToRegisterInvalidCallback() public méthode

testRespondsWithErrorToNonAjaxRequestForAjaxView() public méthode

testRouteOverridenFromHook() public méthode

testRouteSupportsSettingHandlerInHookResultForBackwardsCompatibility() public méthode

3. Route a request for a /bar page. 4. Check that the /foo handler was called.

testRouteSupportsSettingIdentifierInHookResultForBackwardsCompatibility() public méthode

3. Route a request for a /bar page. 4. Check that the /foo handler was called.

Property Details

$fooHandlerCalls protected_oe property

protected int $fooHandlerCalls
Résultat integer

$hooks protected_oe property

protected PluginHooksService,elgg $hooks
Résultat PluginHooksService

$pages protected_oe property

protected string $pages
Résultat string

$request protected_oe property

protected Request,Elgg\Http $request
Résultat Elgg\Http\Request

$router protected_oe property

protected Router,elgg $router
Résultat Router

$translator protected_oe property

protected Translator,Elgg\I18n $translator
Résultat Elgg\I18n\Translator

$viewsDir protected_oe property

protected string $viewsDir
Résultat string