diff --git a/core/modules/taxonomy/src/Tests/TaxonomyTestTrait.php b/core/modules/taxonomy/src/Tests/TaxonomyTestTrait.php index 746be2c..7c4b769 100644 --- a/core/modules/taxonomy/src/Tests/TaxonomyTestTrait.php +++ b/core/modules/taxonomy/src/Tests/TaxonomyTestTrait.php @@ -2,7 +2,7 @@ /** * @file - * Definition of Drupal\taxonomy\Tests\TaxonomyTestTrait. + * Contains Drupal\taxonomy\Tests\TaxonomyTestTrait. */ namespace Drupal\taxonomy\Tests; diff --git a/core/modules/taxonomy/src/Tests/TermKernelTest.php b/core/modules/taxonomy/src/Tests/TermKernelTest.php index 60c61ea..ce7ff37 100644 --- a/core/modules/taxonomy/src/Tests/TermKernelTest.php +++ b/core/modules/taxonomy/src/Tests/TermKernelTest.php @@ -2,7 +2,7 @@ /** * @file - * Definition of Drupal\taxonomy\Tests\TermKernelTest. + * Contains Drupal\taxonomy\Tests\TermKernelTest. */ namespace Drupal\taxonomy\Tests; @@ -10,6 +10,7 @@ use Drupal\taxonomy\Entity\Term; use Drupal\taxonomy\Tests\TaxonomyTestTrait; use Drupal\simpletest\KernelTestBase; + /** * Kernel tests for taxonomy term functions. * @@ -33,7 +34,11 @@ protected function setUp() { $this->installEntitySchema('taxonomy_term'); } - function testTermDelete() { + /** + * Deleting terms should also remove related vocabulary. + * Deleting an invalid term should silently fail. + */ + public function testTermDelete() { $vocabulary = $this->createVocabulary(); $valid_term = $this->createTerm($vocabulary); // Delete a valid term. @@ -48,7 +53,7 @@ function testTermDelete() { /** * Deleting a parent of a term with multiple parents does not delete the term. */ - function testMultipleParentDelete() { + public function testMultipleParentDelete() { $vocabulary = $this->createVocabulary(); $parent_term1 = $this->createTerm($vocabulary); $parent_term2 = $this->createTerm($vocabulary); @@ -72,7 +77,7 @@ function testMultipleParentDelete() { /** * Test a taxonomy with terms that have multiple parents of different depths. */ - function testTaxonomyVocabularyTree() { + public function testTaxonomyVocabularyTree() { // Create a new vocabulary with 6 terms. $vocabulary = $this->createVocabulary(); $term = array();