PHP Class Contao\CoreBundle\Test\Routing\UrlGeneratorTest

Inheritance: extends Contao\CoreBundle\Test\TestCase
Datei anzeigen Open project: contao/core-bundle

Public Methods

Method Description
testAutoItem ( ) Tests the auto_item support.
testAutoItemDisabled ( ) Tests the router with auto_item being disabled.
testContextNotModifiedIfHostnameIsSet ( ) Tests that the context is not modified if the hostname is set.
testIndex ( ) Tests that the index fragment is omitted.
testInstantiation ( ) Tests the object instantiation.
testRemovesLocale ( ) Tests that the locale is removed if prepend_locale is not set.
testReplaceParameters ( ) Tests the parameter replacement.
testRoute ( ) Tests the router.
testSetContext ( ) Tests the setContext() method.
testSetContextFromDomain ( ) Tests setting the context from a domain.
testThrowsExceptionOnMissingParameter ( ) Tests that an exception is thrown if a parameter is missing.
testWithNonArrayParameters ( ) Tests the generator with non-array parameters.
testWithoutParameters ( ) Tests the router without parameters.

Protected Methods

Method Description
setUp ( )

Private Methods

Method Description
getGenerator ( boolean $prependLocale = false, integer $returnArgument = 1, boolean $useAutoItem = true ) : UrlGenerator Returns an UrlGenerator object.

Method Details

setUp() protected method

protected setUp ( )

testAutoItem() public method

Tests the auto_item support.
public testAutoItem ( )

testAutoItemDisabled() public method

Tests the router with auto_item being disabled.

testContextNotModifiedIfHostnameIsSet() public method

To tests this case, we omit the _ssl parameter and set the scheme to "https" in the context. If the generator still returns a HTTPS URL, we know that the context has not been modified.

testIndex() public method

Tests that the index fragment is omitted.
public testIndex ( )

testInstantiation() public method

Tests the object instantiation.
public testInstantiation ( )

testRemovesLocale() public method

Tests that the locale is removed if prepend_locale is not set.
public testRemovesLocale ( )

testReplaceParameters() public method

Tests the parameter replacement.

testRoute() public method

Tests the router.
public testRoute ( )

testSetContext() public method

Tests the setContext() method.
public testSetContext ( )

testSetContextFromDomain() public method

Tests setting the context from a domain.

testThrowsExceptionOnMissingParameter() public method

Tests that an exception is thrown if a parameter is missing.

testWithNonArrayParameters() public method

Tests the generator with non-array parameters.

testWithoutParameters() public method

Tests the router without parameters.