Drupal 8  8.0.2
EntityUrlLanguageTest Class Reference
Inheritance diagram for EntityUrlLanguageTest:

Public Member Functions

 testEntityUrlLanguage ()
 
 testEntityUrlLanguageWithLanguageContentEnabled ()
 

Static Public Attributes

static $modules = ['entity_test', 'user']
 
- Static Public Attributes inherited from LanguageTestBase
static $modules = array('system', 'language', 'language_test')
 

Protected Member Functions

 setUp ()
 
 createTranslatableEntity ()
 
 setCurrentRequestForRoute ($path, $route_name)
 
- Protected Member Functions inherited from LanguageTestBase
 setUp ()
 

Protected Attributes

 $entity
 
- Protected Attributes inherited from LanguageTestBase
 $languageManager
 
 $state
 

Detailed Description

Tests the language of entity URLs. language

Member Function Documentation

createTranslatableEntity ( )
protected

Creates a translated entity.

References Entity\create().

Here is the call graph for this function:

setCurrentRequestForRoute (   $path,
  $route_name 
)
protected

Sets the current request to a specific path with the corresponding route.

Parameters
string$pathThe path for which the current request should be created.
string$route_nameThe route name for which the route object for the request should be created.

Referenced by EntityUrlLanguageTest\testEntityUrlLanguageWithLanguageContentEnabled().

Here is the caller graph for this function:

testEntityUrlLanguage ( )

Ensures that entity URLs in a language have the right language prefix.

Referenced by EntityUrlLanguageTest\testEntityUrlLanguageWithLanguageContentEnabled().

Here is the caller graph for this function:

testEntityUrlLanguageWithLanguageContentEnabled ( )

Ensures correct entity URLs with the method language-content-entity enabled.

Test case with the method language-content-entity enabled and configured with higher and also with lower priority than the method language-url.

References Drupal\config(), LanguageNegotiationUrl\METHOD_ID, LanguageNegotiationContentEntity\METHOD_ID, LanguageNegotiationContentEntity\QUERY_PARAMETER, EntityUrlLanguageTest\setCurrentRequestForRoute(), EntityUrlLanguageTest\testEntityUrlLanguage(), LanguageInterface\TYPE_CONTENT, and LanguageInterface\TYPE_INTERFACE.

Here is the call graph for this function:


The documentation for this class was generated from the following file: