PHP Class Contao\CoreBundle\Test\EventListener\ToggleViewListenerTest

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

Public Methods

Method Description
setUpBeforeClass ( )
testCookiePath ( ) Tests the cookie path.
testDesktopView ( ) Tests that there is a repsonse with a correct cookie for the desktop view.
testInstantiation ( ) Tests the object instantiation.
testInvalidView ( ) Tests that there is a repsonse with a correct cookie for an invalid view.
testMobileView ( ) Tests that there is a repsonse with a correct cookie for the mobile view.
testNoView ( ) Tests that there is no repsonse if there are no query parameters.
testNotInFrontend ( ) Tests that there is no repsonse if the scope is not "frontend".
testWithoutContainer ( ) Tests that there is no response if there is no container.

Protected Methods

Method Description
setUp ( )

Private Methods

Method Description
assertCookieValue ( Response $response, string $expectedValue ) Checks if a cookie exists and has the correct value.
getCookie ( Response $response ) : Cookie | null Finds the TL_VIEW cookie in a response.

Method Details

setUp() protected method

protected setUp ( )

setUpBeforeClass() public static method

public static setUpBeforeClass ( )

testCookiePath() public method

Tests the cookie path.
public testCookiePath ( )

testDesktopView() public method

Tests that there is a repsonse with a correct cookie for the desktop view.
public testDesktopView ( )

testInstantiation() public method

Tests the object instantiation.
public testInstantiation ( )

testInvalidView() public method

Tests that there is a repsonse with a correct cookie for an invalid view.
public testInvalidView ( )

testMobileView() public method

Tests that there is a repsonse with a correct cookie for the mobile view.
public testMobileView ( )

testNoView() public method

Tests that there is no repsonse if there are no query parameters.
public testNoView ( )

testNotInFrontend() public method

Tests that there is no repsonse if the scope is not "frontend".
public testNotInFrontend ( )

testWithoutContainer() public method

Tests that there is no response if there is no container.