You are here

protected function AliasManagerTest::setUpCurrentLanguage in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/tests/Drupal/Tests/Core/Path/AliasManagerTest.php \Drupal\Tests\Core\Path\AliasManagerTest::setUpCurrentLanguage()

Sets up the current language.

Return value

\Drupal\Core\Language\LanguageInterface The current language object.

10 calls to AliasManagerTest::setUpCurrentLanguage()
AliasManagerTest::testCacheClear in core/tests/Drupal/Tests/Core/Path/AliasManagerTest.php
@covers ::cacheClear
AliasManagerTest::testGetAliasByPathCachedMatch in core/tests/Drupal/Tests/Core/Path/AliasManagerTest.php
Tests the getAliasByPath method for a path that is preloaded.
AliasManagerTest::testGetAliasByPathCachedMissLanguage in core/tests/Drupal/Tests/Core/Path/AliasManagerTest.php
Tests the getAliasByPath cache when a different language is requested.
AliasManagerTest::testGetAliasByPathCachedMissNoAlias in core/tests/Drupal/Tests/Core/Path/AliasManagerTest.php
Tests the getAliasByPath cache with a preloaded path without alias.
AliasManagerTest::testGetAliasByPathMatch in core/tests/Drupal/Tests/Core/Path/AliasManagerTest.php
Tests the getAliasByPath method for a path that has a matching alias.

... See full list

File

core/tests/Drupal/Tests/Core/Path/AliasManagerTest.php, line 542
Contains \Drupal\Tests\Core\Path\AliasManagerTest.

Class

AliasManagerTest
@coversDefaultClass \Drupal\Core\Path\AliasManager @group Path

Namespace

Drupal\Tests\Core\Path

Code

protected function setUpCurrentLanguage() {
  $language = new Language(array(
    'id' => 'en',
  ));
  $this->languageManager
    ->expects($this
    ->any())
    ->method('getCurrentLanguage')
    ->with(LanguageInterface::TYPE_URL)
    ->will($this
    ->returnValue($language));
  return $language;
}