class AuthcacheP13nTestRequestRouterStub in Authenticated User Page Caching (Authcache) 7.2
Stub router.
Hierarchy
- class \AuthcacheP13nTestRequestRouterStub implements AuthcacheP13nRequestRouterInterface
Expanded class hierarchy of AuthcacheP13nTestRequestRouterStub
2 string references to 'AuthcacheP13nTestRequestRouterStub'
- AuthcacheP13nTestFrontcontroller::setUp in modules/
authcache_p13n/ tests/ authcache_p13n.frontcontroller.test - Sets up a Drupal site for running functional and integration tests.
- AuthcacheP13nTestRequestBuilder::testGetRequestCallback in modules/
authcache_p13n/ tests/ authcache_p13n.request-builder.test - Cover authcache_p13n_request_exists().
File
- modules/
authcache_p13n/ tests/ authcache_p13n.stub.inc, line 533 - Stub classes for testing.
View source
class AuthcacheP13nTestRequestRouterStub implements AuthcacheP13nRequestRouterInterface {
/**
* {@inheritdoc}
*/
public function getRoutes() {
return array(
'test/good',
'test/bad',
);
}
/**
* {@inheritdoc}
*/
public function getHandler($route_id) {
switch ($route_id) {
case 'test/good':
return new AuthcacheP13nTestRequestHandlerStub();
case 'test/bad':
return new AuthcacheP13nTestRequestHandlerBadStub();
default:
return FALSE;
}
}
/**
* {@inheritdoc}
*/
public function generateURL($route_id, $arg = NULL) {
if ($route_id === 'test/bad') {
return FALSE;
}
else {
return array(
'path' => 'http://example.com/authcache.php',
'options' => array(
'query' => array(
'r' => $route_id,
'a' => $arg ?: '',
),
),
);
}
}
/**
* {@inheritdoc}
*/
public function rebuild() {
}
}
Members
Name![]() |
Modifiers | Type | Description | Overrides |
---|---|---|---|---|
AuthcacheP13nTestRequestRouterStub:: |
public | function |
Given a request id and an optional argument, return the appropriate URL. Overrides AuthcacheP13nRequestRouterInterface:: |
|
AuthcacheP13nTestRequestRouterStub:: |
public | function |
Return an instance of AuthcacheP13nRequestHandlerInterface. Overrides AuthcacheP13nRequestRouterInterface:: |
|
AuthcacheP13nTestRequestRouterStub:: |
public | function |
Return a list of existing route ids. Overrides AuthcacheP13nRequestRouterInterface:: |
|
AuthcacheP13nTestRequestRouterStub:: |
public | function |
Rebuild the routing information after configuration changes. Overrides AuthcacheP13nRequestRouterInterface:: |