DomainNegotiatorTest.php in Domain Access 8
File
domain/tests/src/Functional/DomainNegotiatorTest.php
View source
<?php
namespace Drupal\Tests\domain\Functional;
use Drupal\Core\Session\AccountInterface;
class DomainNegotiatorTest extends DomainTestBase {
public static $modules = [
'domain',
'domain_test',
'block',
];
public function testDomainNegotiator() {
$this
->domainTableIsEmpty();
$this
->domainCreateTestDomains(4);
$this
->drupalPlaceBlock('domain_server_block');
user_role_grant_permissions(AccountInterface::ANONYMOUS_ROLE, [
'view domain information',
]);
foreach (\Drupal::entityTypeManager()
->getStorage('domain')
->loadMultiple() as $domain) {
$this
->drupalGet($domain
->getPath());
$this
->assertRaw($domain
->label(), 'Loaded the proper domain.');
}
}
}