You are here

public function UiTest::testBuildHooksUi in Build Hooks 3.x

Same name and namespace in other branches
  1. 8.2 tests/src/Functional/UiTest.php \Drupal\Tests\build_hooks\Functional\UiTest::testBuildHooksUi()

Test build hooks UI.

File

tests/src/Functional/UiTest.php, line 42

Class

UiTest
Defines a class for testing build hooks UI.

Namespace

Drupal\Tests\build_hooks\Functional

Code

public function testBuildHooksUi() {
  $this
    ->drupalPlaceBlock('system_messages_block');
  $this
    ->drupalPlaceBlock('local_actions_block');
  $this
    ->drupalPlaceBlock('page_title_block');
  $this
    ->assertThatAnonymousUsersCannotAccessSettingsForm();
  $this
    ->assertThatAnonymousUsersCannotAccessPluginTypesList();
  $this
    ->assertThatAnonymousUsersCannotAccessEnviromentSettingsPages();
  $this
    ->drupalLogin($this
    ->createUser([
    'administer site configuration',
    'access administration pages',
    'access content',
    'access toolbar',
    'trigger deployments',
    'manage frontend environments',
    'access site reports',
    'view test entity',
  ]));
  $this
    ->assertSettingsFormFunctionality();
  $this
    ->assertPluginTypesListFunctionality();
  $this
    ->assertAddEnvironmentForPluginFunctionality();
  $environment = $this
    ->assertThatAdminCanAddFrontEndEnvironment();
  $environment = $this
    ->assertThatAdminCanEditFrontEndEnvironment($environment);
  $this
    ->assertFrontEndEnvironmentDeploymentFormFunctionality($environment);
  $this
    ->assertToolbarIntegration($environment, 2);
  $this
    ->assertInactiveEnvironmentToolbarIntegration($environment);
  $this
    ->assertThatAdminCanDeleteFrontEndEnvironment($environment);
}