Drupal 8  8.0.2
LanguageUnitTest Class Reference
Inheritance diagram for LanguageUnitTest:

Public Member Functions

 testConstruct ()
 
 testGetName ()
 
 testGetLangcode ()
 
 testGetDirection ()
 
 testIsDefault ()
 
 testSortArrayOfLanguages (array $languages, array $expected)
 
 providerTestSortArrayOfLanguages ()
 
- Public Member Functions inherited from UnitTestCase
 randomMachineName ($length=8)
 
 getConfigFactoryStub (array $configs=array())
 
 getConfigStorageStub (array $configs)
 
 getStringTranslationStub ()
 

Additional Inherited Members

- Protected Member Functions inherited from UnitTestCase
 setUp ()
 
 getRandomGenerator ()
 
 assertArrayEquals (array $expected, array $actual, $message=NULL)
 
 getBlockMockWithMachineName ($machine_name)
 
 getContainerWithCacheTagsInvalidator (CacheTagsInvalidatorInterface $cache_tags_validator)
 
 getClassResolverStub ()
 
- Protected Attributes inherited from UnitTestCase
 $randomGenerator
 
 $root
 

Detailed Description

Language

Member Function Documentation

providerTestSortArrayOfLanguages ( )

Provides data for testSortArrayOfLanguages.

Returns
array An array of test data.
testConstruct ( )

::__construct

References UnitTestCase\randomMachineName().

Here is the call graph for this function:

testGetDirection ( )

::getDirection

References LanguageInterface\DIRECTION_RTL, and UnitTestCase\randomMachineName().

Here is the call graph for this function:

testGetLangcode ( )

::getId

References UnitTestCase\randomMachineName().

Here is the call graph for this function:

testGetName ( )

::getName

References UnitTestCase\randomMachineName().

Here is the call graph for this function:

testIsDefault ( )

::isDefault

References UnitTestCase\randomMachineName(), and Drupal\setContainer().

Here is the call graph for this function:

testSortArrayOfLanguages ( array  $languages,
array  $expected 
)

Tests sorting an array of language objects.

::sort

providerTestSortArrayOfLanguages

Parameters
\Drupal\Core\Language\LanguageInterface[]$languages An array of language objects.
array$expectedThe expected array of keys.

References Language\sort().

Here is the call graph for this function:


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