Signify\EnvBar\Tests\EnvBarExtensionTest
Tests the display of the EnvBar according to the environment type, page stage and the user's access
Synopsis
class EnvBarExtensionTest
extends FunctionalTest
{
- // members
- protected static string $fixture_file = 'EnvBarExtensionTest.yml';
- // methods
- public void testDevEnvironmentDraftStage()
- public void testTestEnvironmentDraftStage()
- public void testLiveEnvironmentDraftStage()
- public void testDevEnvironmentPublishedStage()
- public void testTestEnvironmentPublishedStage()
- public void testLiveEnvironmentPublishedStage()
- public void EnvBarAccessGranted()
- public void EnvBarVisible()
- public void EnvBarNotIncluded()
- public void NotAuthorised()
- public void RedirectToLogin()
- public void getStagePageURL()
Hierarchy
Extends
- SilverStripe\Dev\FunctionalTest
Members
protected
- $fixture_file
Methods
public
- EnvBarAccessGranted() — Test the content of the EnvBar is correct for an authorised user
- EnvBarNotIncluded() — Test EnvBar is not injected into the page
- EnvBarVisible() — Test the content of the EnvBar is correct for an unauthorised user
- NotAuthorised() — Test the unauthorised user is forbidden access
- RedirectToLogin() — Test the anonymous user is redirected to the login
- getStagePageURL() — Get the correct url for the test
- testDevEnvironmentDraftStage() — Test EnvBar when in the dev environment viewing a draft page
- testDevEnvironmentPublishedStage() — Test EnvBar when in the dev environment viewing a published page
- testLiveEnvironmentDraftStage() — Test EnvBar when in the live environment viewing a draft page
- testLiveEnvironmentPublishedStage() — Test EnvBar when in the live environment viewing a published page
- testTestEnvironmentDraftStage() — Test EnvBar when in the test environment viewing a draft page
- testTestEnvironmentPublishedStage() — Test EnvBar when in the test environment viewing a published page