Mercurial > hg > isophonics-drupal-site
comparison core/modules/taxonomy/tests/src/Functional/VocabularyLanguageTest.php @ 17:129ea1e6d783
Update, including to Drupal core 8.6.10
author | Chris Cannam |
---|---|
date | Thu, 28 Feb 2019 13:21:36 +0000 |
parents | 4c8ae668cc8c |
children |
comparison
equal
deleted
inserted
replaced
16:c2387f117808 | 17:129ea1e6d783 |
---|---|
1 <?php | 1 <?php |
2 | 2 |
3 namespace Drupal\Tests\taxonomy\Functional; | 3 namespace Drupal\Tests\taxonomy\Functional; |
4 | 4 |
5 use Drupal\Component\Utility\Unicode; | |
6 use Drupal\language\Entity\ConfigurableLanguage; | 5 use Drupal\language\Entity\ConfigurableLanguage; |
7 use Drupal\language\Entity\ContentLanguageSettings; | 6 use Drupal\language\Entity\ContentLanguageSettings; |
8 | 7 |
9 /** | 8 /** |
10 * Tests the language functionality for vocabularies. | 9 * Tests the language functionality for vocabularies. |
41 | 40 |
42 // Check that we have the language selector available. | 41 // Check that we have the language selector available. |
43 $this->assertField('edit-langcode', 'The language selector field was found on the page.'); | 42 $this->assertField('edit-langcode', 'The language selector field was found on the page.'); |
44 | 43 |
45 // Create the vocabulary. | 44 // Create the vocabulary. |
46 $vid = Unicode::strtolower($this->randomMachineName()); | 45 $vid = mb_strtolower($this->randomMachineName()); |
47 $edit['name'] = $this->randomMachineName(); | 46 $edit['name'] = $this->randomMachineName(); |
48 $edit['description'] = $this->randomMachineName(); | 47 $edit['description'] = $this->randomMachineName(); |
49 $edit['langcode'] = 'aa'; | 48 $edit['langcode'] = 'aa'; |
50 $edit['vid'] = $vid; | 49 $edit['vid'] = $vid; |
51 $this->drupalPostForm(NULL, $edit, t('Save')); | 50 $this->drupalPostForm(NULL, $edit, t('Save')); |
70 public function testVocabularyDefaultLanguageForTerms() { | 69 public function testVocabularyDefaultLanguageForTerms() { |
71 // Add a new vocabulary and check that the default language settings are for | 70 // Add a new vocabulary and check that the default language settings are for |
72 // the terms are saved. | 71 // the terms are saved. |
73 $edit = [ | 72 $edit = [ |
74 'name' => $this->randomMachineName(), | 73 'name' => $this->randomMachineName(), |
75 'vid' => Unicode::strtolower($this->randomMachineName()), | 74 'vid' => mb_strtolower($this->randomMachineName()), |
76 'default_language[langcode]' => 'bb', | 75 'default_language[langcode]' => 'bb', |
77 'default_language[language_alterable]' => TRUE, | 76 'default_language[language_alterable]' => TRUE, |
78 ]; | 77 ]; |
79 $vid = $edit['vid']; | 78 $vid = $edit['vid']; |
80 $this->drupalPostForm('admin/structure/taxonomy/add', $edit, t('Save')); | 79 $this->drupalPostForm('admin/structure/taxonomy/add', $edit, t('Save')); |