public function LanguageDependencyInjectionTest::testDependencyInjectedNewLanguage in Drupal 8
Same name and namespace in other branches
- 9 core/modules/language/tests/src/Kernel/LanguageDependencyInjectionTest.php \Drupal\Tests\language\Kernel\LanguageDependencyInjectionTest::testDependencyInjectedNewLanguage()
Test dependency injected languages against a new Language object.
See also
\Drupal\Core\Language\LanguageInterface
File
- core/
modules/ language/ tests/ src/ Kernel/ LanguageDependencyInjectionTest.php, line 21
Class
- LanguageDependencyInjectionTest
- Compares the default language from $GLOBALS against the dependency injected language object.
Namespace
Drupal\Tests\language\KernelCode
public function testDependencyInjectedNewLanguage() {
$expected = $this->languageManager
->getDefaultLanguage();
$result = $this->languageManager
->getCurrentLanguage();
$this
->assertSame($expected, $result);
}