function LanguageDependencyInjectionTest::testDependencyInjectedNewLanguage
Same name in other branches
- 8.9.x core/modules/language/tests/src/Kernel/LanguageDependencyInjectionTest.php \Drupal\Tests\language\Kernel\LanguageDependencyInjectionTest::testDependencyInjectedNewLanguage()
- 10 core/modules/language/tests/src/Kernel/LanguageDependencyInjectionTest.php \Drupal\Tests\language\Kernel\LanguageDependencyInjectionTest::testDependencyInjectedNewLanguage()
- 11.x core/modules/language/tests/src/Kernel/LanguageDependencyInjectionTest.php \Drupal\Tests\language\Kernel\LanguageDependencyInjectionTest::testDependencyInjectedNewLanguage()
Tests dependency injected languages against a new Language object.
See also
\Drupal\Core\Language\LanguageInterface
File
-
core/
modules/ language/ tests/ src/ Kernel/ LanguageDependencyInjectionTest.php, line 20
Class
- LanguageDependencyInjectionTest
- Tests that a language object can be injected.
Namespace
Drupal\Tests\language\KernelCode
public function testDependencyInjectedNewLanguage() {
$expected = $this->languageManager
->getDefaultLanguage();
$result = $this->languageManager
->getCurrentLanguage();
$this->assertSame($expected, $result);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.