You are here

public function DomainTestTrait::getDomains in Domain Access 8

Returns an uncached list of all domains.

Return value

array An array of domain entities.

3 calls to DomainTestTrait::getDomains()
ActiveDomainDefaultArgumentTest::createTestData in domain/tests/src/Functional/Views/ActiveDomainDefaultArgumentTest.php
ActiveDomainDefaultArgumentTest::testActiveDomainDefaultArgument in domain/tests/src/Functional/Views/ActiveDomainDefaultArgumentTest.php
Tests active_domain default argument.
DomainAliasListBuilderTest::testDomainListBuilder in domain_alias/tests/src/Functional/DomainAliasListBuilderTest.php
Basic test setup.

File

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

Class

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

Namespace

Drupal\Tests\domain\Traits

Code

public function getDomains() {
  \Drupal::entityTypeManager()
    ->getStorage('domain')
    ->resetCache();
  return \Drupal::entityTypeManager()
    ->getStorage('domain')
    ->loadMultiple();
}