You are here

public function DomainContextTest::testDomainBlockConfiguration in Domain Access 8

Test block context when no domains exist.

See https://www.drupal.org/project/domain/issues/3201514.

File

domain/tests/src/Functional/DomainContextTest.php, line 30

Class

DomainContextTest
Tests the domain block visibility condition.

Namespace

Drupal\Tests\domain\Functional

Code

public function testDomainBlockConfiguration() {
  $admin = $this
    ->drupalCreateUser([
    'access administration pages',
    'administer blocks',
    'administer domains',
  ]);
  $this
    ->drupalLogin($admin);

  // Try to configure a block.
  $url = 'admin/structure/block/manage/bartik_branding';
  $this
    ->drupalGet($url);

  // Create one domain programmatically.
  $this
    ->domainCreateTestDomains(1);

  // Try to configure a block.
  $url = 'admin/structure/block/manage/bartik_branding';
  $this
    ->drupalGet($url);
}