You are here

public function DomainTestTrait::domainTableIsEmpty in Domain Access 8

Reusable test function for checking initial / empty table status.

16 calls to DomainTestTrait::domainTableIsEmpty()
DomainAccessCacheTest::testDomainResponse in domain_access/tests/src/Functional/DomainAccessCacheTest.php
Tests that a domain response is proper.
DomainAliasNegotiatorTest::testDomainAliasNegotiator in domain_alias/tests/src/Functional/DomainAliasNegotiatorTest.php
Tests the handling of aliased requests.
DomainAliasValidatorTest::testDomainAliasValidator in domain_alias/tests/src/Functional/DomainAliasValidatorTest.php
Tests that a domain hostname validates.
DomainConfigCacheTest::testDomainResponse in domain_config/tests/src/Functional/DomainConfigCacheTest.php
Tests that a domain response is proper.
DomainConfigHomepageTest::testDomainConfigHomepage in domain_config/tests/src/Functional/DomainConfigHomepageTest.php
Tests that domain-specific homepage loading works.

... See full list

File

domain/tests/src/Traits/DomainTestTrait.php, line 156

Class

DomainTestTrait
Contains helper classes for tests to set up various configuration.

Namespace

Drupal\Tests\domain\Traits

Code

public function domainTableIsEmpty() {
  $domains = \Drupal::entityTypeManager()
    ->getStorage('domain')
    ->loadMultiple(NULL, TRUE);
  $this
    ->assertEmpty($domains, 'No domains have been created.');
  $default_id = \Drupal::entityTypeManager()
    ->getStorage('domain')
    ->loadDefaultId();
  $this
    ->assertEmpty($default_id, 'No default domain has been set.');
}