ConfigurableLanguageManagerTest.php
Same filename in this branch
Same filename in other branches
- 8.9.x core/modules/language/tests/src/Kernel/ConfigurableLanguageManagerTest.php
- 8.9.x core/modules/language/tests/src/Functional/ConfigurableLanguageManagerTest.php
- 10 core/modules/language/tests/src/Kernel/ConfigurableLanguageManagerTest.php
- 10 core/modules/language/tests/src/Functional/ConfigurableLanguageManagerTest.php
- 11.x core/modules/language/tests/src/Kernel/ConfigurableLanguageManagerTest.php
- 11.x core/modules/language/tests/src/Functional/ConfigurableLanguageManagerTest.php
Namespace
Drupal\Tests\language\KernelFile
-
core/
modules/ language/ tests/ src/ Kernel/ ConfigurableLanguageManagerTest.php
View source
<?php
namespace Drupal\Tests\language\Kernel;
use Drupal\Core\Language\LanguageInterface;
use Drupal\Core\Url;
/**
* Tests the ConfigurableLanguage entity.
*
* @group language
* @coversDefaultClass \Drupal\language\ConfigurableLanguageManager
*/
class ConfigurableLanguageManagerTest extends LanguageTestBase {
/**
* {@inheritdoc}
*/
protected static $modules = [
'user',
];
/**
* The language negotiator.
*
* @var \Drupal\language\LanguageNegotiatorInterface
*/
protected $languageNegotiator;
/**
* The language manager.
*
* @var \Drupal\language\ConfigurableLanguageManagerInterface
*/
protected $languageManager;
/**
* {@inheritdoc}
*/
protected function setUp() : void {
parent::setUp();
$this->installEntitySchema('user');
$this->languageNegotiator = $this->container
->get('language_negotiator');
$this->languageManager = $this->container
->get('language_manager');
}
/**
* @covers ::getLanguageSwitchLinks
*/
public function testLanguageSwitchLinks() {
$this->languageNegotiator
->setCurrentUser($this->prophesize('Drupal\\Core\\Session\\AccountInterface')
->reveal());
$this->languageManager
->getLanguageSwitchLinks(LanguageInterface::TYPE_INTERFACE, new Url('<current>'));
}
}
Classes
Title | Deprecated | Summary |
---|---|---|
ConfigurableLanguageManagerTest | Tests the ConfigurableLanguage entity. |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.