X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=web%2Fcore%2Fmodules%2Flanguage%2Fsrc%2FTests%2FLanguageLocaleListTest.php;fp=web%2Fcore%2Fmodules%2Flanguage%2Fsrc%2FTests%2FLanguageLocaleListTest.php;h=0000000000000000000000000000000000000000;hp=5f96d89e5b237e8ec674fca94bfbddc51892be3b;hb=9917807b03b64faf00f6a1f29dcb6eafc454efa5;hpb=aea91e65e895364e460983b890e295aa5d5540a5 diff --git a/web/core/modules/language/src/Tests/LanguageLocaleListTest.php b/web/core/modules/language/src/Tests/LanguageLocaleListTest.php deleted file mode 100644 index 5f96d89e5..000000000 --- a/web/core/modules/language/src/Tests/LanguageLocaleListTest.php +++ /dev/null @@ -1,73 +0,0 @@ -storage = $this->container->get('locale.storage'); - } - - /** - * Tests adding, editing, and deleting languages. - */ - public function testLanguageLocaleList() { - // User to add and remove language. - $admin_user = $this->drupalCreateUser(['administer languages', 'access administration pages']); - $this->drupalLogin($admin_user); - - // Add predefined language. - $edit = [ - 'predefined_langcode' => 'fr', - ]; - $this->drupalPostForm('admin/config/regional/language/add', $edit, t('Add language')); - $this->assertText('The language French has been created and can now be used'); - $this->assertUrl(\Drupal::url('entity.configurable_language.collection', [], ['absolute' => TRUE])); - $this->rebuildContainer(); - - // Translate Spanish language to French (Espagnol). - $source = $this->storage->createString([ - 'source' => 'Spanish', - 'context' => '', - ])->save(); - $this->storage->createTranslation([ - 'lid' => $source->lid, - 'language' => 'fr', - 'translation' => 'Espagnol', - ])->save(); - - // Get language list displayed in select list. - $this->drupalGet('fr/admin/config/regional/language/add'); - $select = $this->xpath('//select[@id="edit-predefined-langcode"]'); - $select_element = (array) end($select); - $options = $select_element['option']; - // Remove the 'Custom language...' option form the end. - array_pop($options); - // Order language list. - $options_ordered = $options; - natcasesort($options_ordered); - - // Check the language list displayed is ordered. - $this->assertTrue($options === $options_ordered, 'Language list is ordered.'); - } - -}