function CountryManagerTest::testHookCountriesAlter
Same name in other branches
- 10 core/tests/Drupal/KernelTests/Core/Locale/CountryManagerTest.php \Drupal\KernelTests\Core\Locale\CountryManagerTest::testHookCountriesAlter()
Tests that hook_countries_alters() works as expected.
File
-
core/
tests/ Drupal/ KernelTests/ Core/ Locale/ CountryManagerTest.php, line 29
Class
- CountryManagerTest
- Tests Country Manager functionality.
Namespace
Drupal\KernelTests\Core\LocaleCode
public function testHookCountriesAlter() : void {
$countries = $this->container
->get('country_manager')
->getList();
self::assertArrayHasKey('EB', $countries);
self::assertSame('Elbonia', $countries['EB']);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.