diff --git a/core/modules/taxonomy/src/Tests/VocabularyUiTest.php b/core/modules/taxonomy/src/Tests/VocabularyUiTest.php index 3066ef07dfda22145df37a08e4433b525308af38..76fcac2bb08c92437fdad39fc87f9b9c5eec983d 100644 --- a/core/modules/taxonomy/src/Tests/VocabularyUiTest.php +++ b/core/modules/taxonomy/src/Tests/VocabularyUiTest.php @@ -47,14 +47,17 @@ function testVocabularyInterface() { // Edit the vocabulary. $this->drupalGet('admin/structure/taxonomy'); - $this->assertText($edit['name'], 'Vocabulary found in the vocabulary overview listing.'); + $this->assertText($edit['name'], 'Vocabulary name found in the vocabulary overview listing.'); + $this->assertText($edit['description'], 'Vocabulary description found in the vocabulary overview listing.'); $this->assertLinkByHref(Url::fromRoute('entity.taxonomy_term.add_form', ['taxonomy_vocabulary' => $edit['vid']])->toString()); $this->clickLink(t('Edit vocabulary')); $edit = array(); $edit['name'] = $this->randomMachineName(); + $edit['description'] = $this->randomMachineName(); $this->drupalPostForm(NULL, $edit, t('Save')); $this->drupalGet('admin/structure/taxonomy'); - $this->assertText($edit['name'], 'Vocabulary found in the vocabulary overview listing.'); + $this->assertText($edit['name'], 'Vocabulary name found in the vocabulary overview listing.'); + $this->assertText($edit['description'], 'Vocabulary description found in the vocabulary overview listing.'); // Try to submit a vocabulary with a duplicate machine name. $edit['vid'] = $vid; diff --git a/core/modules/taxonomy/src/VocabularyListBuilder.php b/core/modules/taxonomy/src/VocabularyListBuilder.php index b5597bb2ecfabf20d608860ef8d906be045dbef9..9c24311f1dc4805db9124832568c0561bbc9d59c 100644 --- a/core/modules/taxonomy/src/VocabularyListBuilder.php +++ b/core/modules/taxonomy/src/VocabularyListBuilder.php @@ -56,6 +56,7 @@ public function getDefaultOperations(EntityInterface $entity) { */ public function buildHeader() { $header['label'] = t('Vocabulary name'); + $header['description'] = t('Description'); return $header + parent::buildHeader(); } @@ -64,6 +65,7 @@ public function buildHeader() { */ public function buildRow(EntityInterface $entity) { $row['label'] = $entity->label(); + $row['description']['data'] = ['#markup' => $entity->getDescription()]; return $row + parent::buildRow($entity); }