Drupal 8  8.0.2
RedirectResponseSubscriberTest Class Reference
Inheritance diagram for RedirectResponseSubscriberTest:

Public Member Functions

 testDestinationRedirect (Request $request, $expected)
 
 testDestinationRedirectToExternalUrl ($request, $expected)
 
 testRedirectWithOptInExternalUrl ()
 
 providerTestDestinationRedirectToExternalUrl ()
 
 testDestinationRedirectWithInvalidUrl (Request $request)
 
 providerTestDestinationRedirectWithInvalidUrl ()
 
 testSanitizeDestinationForGet ($input, $output)
 
 testSanitizeDestinationForPost ($input, $output)
 
 providerTestSanitizeDestination ()
 
- Public Member Functions inherited from UnitTestCase
 randomMachineName ($length=8)
 
 getConfigFactoryStub (array $configs=array())
 
 getConfigStorageStub (array $configs)
 
 getStringTranslationStub ()
 

Static Public Member Functions

static providerTestDestinationRedirect ()
 

Protected Member Functions

 setUp ()
 
- Protected Member Functions inherited from UnitTestCase
 setUp ()
 
 getRandomGenerator ()
 
 assertArrayEquals (array $expected, array $actual, $message=NULL)
 
 getBlockMockWithMachineName ($machine_name)
 
 getContainerWithCacheTagsInvalidator (CacheTagsInvalidatorInterface $cache_tags_validator)
 
 getClassResolverStub ()
 

Protected Attributes

 $requestContext
 
 $urlAssembler
 
- Protected Attributes inherited from UnitTestCase
 $randomGenerator
 
 $root
 

Detailed Description

EventSubscriber

Member Function Documentation

static providerTestDestinationRedirect ( )
static

Data provider for testDestinationRedirect().

See Also
::testDestinationRedirect()
providerTestDestinationRedirectToExternalUrl ( )
providerTestDestinationRedirectWithInvalidUrl ( )
providerTestSanitizeDestination ( )

Data provider for testSanitizeDestination().

setUp ( )
protected

{}

References Drupal\setContainer().

Here is the call graph for this function:

testDestinationRedirect ( Request  $request,
  $expected 
)

Test destination detection and redirection.

Parameters
Request$requestThe request object with destination query set.
string | bool$expectedThe expected target URL or FALSE.

::checkRedirectUrl providerTestDestinationRedirect

testDestinationRedirectToExternalUrl (   $request,
  $expected 
)

providerTestDestinationRedirectToExternalUrl

testDestinationRedirectWithInvalidUrl ( Request  $request)

providerTestDestinationRedirectWithInvalidUrl

testRedirectWithOptInExternalUrl ( )

::checkRedirectUrl

testSanitizeDestinationForGet (   $input,
  $output 
)

Tests that $_GET only contain internal URLs.

::sanitizeDestination

providerTestSanitizeDestination

See Also
::isExternal
testSanitizeDestinationForPost (   $input,
  $output 
)

Tests that $_REQUEST['destination'] only contain internal URLs.

::sanitizeDestination

providerTestSanitizeDestination

See Also
::isExternal

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