private function DomainConfigOverriderTest::expectedName in Domain Access 8
Returns the expected site name value from our test configuration.
Parameters
\Drupal\domain\DomainInterface $domain: The Domain object.
string $langcode: A two-digit language code.
Return value
string The expected name.
1 call to DomainConfigOverriderTest::expectedName()
- DomainConfigOverriderTest::testDomainConfigOverrider in domain_config/
tests/ src/ Functional/ DomainConfigOverriderTest.php - Tests that domain-specific variable loading works.
File
- domain_config/
tests/ src/ Functional/ DomainConfigOverriderTest.php, line 88
Class
- DomainConfigOverriderTest
- Tests the domain config system.
Namespace
Drupal\Tests\domain_config\FunctionalCode
private function expectedName(DomainInterface $domain, $langcode = NULL) {
$name = '';
switch ($domain
->id()) {
case 'one_example_com':
$name = $langcode == 'es' ? 'Drupal' : 'One';
break;
case 'two_example_com':
$name = $langcode == 'es' ? 'Dos' : 'Two';
break;
case 'three_example_com':
$name = 'Drupal';
break;
case 'four_example_com':
$name = 'Four';
break;
}
return $name;
}