diff --git a/core/modules/taxonomy/src/Tests/TaxonomyTestBase.php b/core/modules/taxonomy/src/Tests/TaxonomyTestBase.php index 45ff540..35e5117 100644 --- a/core/modules/taxonomy/src/Tests/TaxonomyTestBase.php +++ b/core/modules/taxonomy/src/Tests/TaxonomyTestBase.php @@ -9,6 +9,7 @@ use Drupal\Core\Language\LanguageInterface; use Drupal\simpletest\WebTestBase; +use Drupal\taxonomy\Entity\Vocabulary; /** * Provides common helper methods for Taxonomy module tests. @@ -49,8 +50,17 @@ function createVocabulary() { /** * Returns a new term with random properties in vocabulary $vid. + * + * @param \Drupal\taxonomy\Entity\Vocabulary $vocabulary + * The vocabulary object. + * @param array $values + * (optional) An array of values to set, keyed by property name. If the + * entity type has bundles, the bundle key has to be specified. + * + * @return \Drupal\taxonomy\Entity\Term + * The new taxonomy term object. */ - function createTerm($vocabulary, $values = array()) { + function createTerm(Vocabulary $vocabulary, $values = array()) { $filter_formats = filter_formats(); $format = array_pop($filter_formats); $term = entity_create('taxonomy_term', $values + array(