public function LanguageUnitTest::testSortArrayOfLanguages in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/tests/Drupal/Tests/Core/Language/LanguageUnitTest.php \Drupal\Tests\Core\Language\LanguageUnitTest::testSortArrayOfLanguages()
Tests sorting an array of language objects.
@covers ::sort
@dataProvider providerTestSortArrayOfLanguages
Parameters
\Drupal\Core\Language\LanguageInterface[] $languages: An array of language objects.
array $expected: The expected array of keys.
File
- core/
tests/ Drupal/ Tests/ Core/ Language/ LanguageUnitTest.php, line 100 - Contains \Drupal\Tests\Core\Language\LanguageUnitTest.
Class
- LanguageUnitTest
- @coversDefaultClass \Drupal\Core\Language\Language @group Language
Namespace
Drupal\Tests\Core\LanguageCode
public function testSortArrayOfLanguages(array $languages, array $expected) {
Language::sort($languages);
$this
->assertSame($expected, array_keys($languages));
}