comparison core/modules/taxonomy/tests/src/Functional/VocabularyUiTest.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
5 use Drupal\Component\Utility\Unicode;
6 4
7 use Drupal\Core\Url; 5 use Drupal\Core\Url;
8 use Drupal\taxonomy\Entity\Vocabulary; 6 use Drupal\taxonomy\Entity\Vocabulary;
9 7
10 /** 8 /**
37 $this->drupalGet('admin/structure/taxonomy'); 35 $this->drupalGet('admin/structure/taxonomy');
38 36
39 // Create a new vocabulary. 37 // Create a new vocabulary.
40 $this->clickLink(t('Add vocabulary')); 38 $this->clickLink(t('Add vocabulary'));
41 $edit = []; 39 $edit = [];
42 $vid = Unicode::strtolower($this->randomMachineName()); 40 $vid = mb_strtolower($this->randomMachineName());
43 $edit['name'] = $this->randomMachineName(); 41 $edit['name'] = $this->randomMachineName();
44 $edit['description'] = $this->randomMachineName(); 42 $edit['description'] = $this->randomMachineName();
45 $edit['vid'] = $vid; 43 $edit['vid'] = $vid;
46 $this->drupalPostForm(NULL, $edit, t('Save')); 44 $this->drupalPostForm(NULL, $edit, t('Save'));
47 $this->assertRaw(t('Created new vocabulary %name.', ['%name' => $edit['name']]), 'Vocabulary created successfully.'); 45 $this->assertRaw(t('Created new vocabulary %name.', ['%name' => $edit['name']]), 'Vocabulary created successfully.');
129 /** 127 /**
130 * Deleting a vocabulary. 128 * Deleting a vocabulary.
131 */ 129 */
132 public function testTaxonomyAdminDeletingVocabulary() { 130 public function testTaxonomyAdminDeletingVocabulary() {
133 // Create a vocabulary. 131 // Create a vocabulary.
134 $vid = Unicode::strtolower($this->randomMachineName()); 132 $vid = mb_strtolower($this->randomMachineName());
135 $edit = [ 133 $edit = [
136 'name' => $this->randomMachineName(), 134 'name' => $this->randomMachineName(),
137 'vid' => $vid, 135 'vid' => $vid,
138 ]; 136 ];
139 $this->drupalPostForm('admin/structure/taxonomy/add', $edit, t('Save')); 137 $this->drupalPostForm('admin/structure/taxonomy/add', $edit, t('Save'));