diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/TermTest.php b/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/TermTest.php index d36a35e..eabd259 100644 --- a/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/TermTest.php +++ b/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/TermTest.php @@ -216,6 +216,13 @@ class TermTest extends TaxonomyTestBase { $this->assertFalse(field_info_field($field_name), format_string('Field %field_name does not exist.', array('%field_name' => $field_name))); $this->drupalGet('taxonomy/autocomplete/' . $field_name . '/' . $tag); $this->assertRaw($message, 'Autocomplete returns correct error message when the taxonomy field does not exist.'); + + // Test the autocomplete path without passing a field_name and terms. + // This should not trigger a PHP notice. + $field_name = ''; + $message = t("Taxonomy field @field_name not found.", array('@field_name' => $field_name)); + $this->drupalGet('taxonomy/autocomplete'); + $this->assertRaw($message, 'Autocomplete returns correct error message when no taxonomy field is given.'); } /**