security update core+modules
This commit is contained in:
@@ -170,7 +170,8 @@ class TaxonomyVocabularyFunctionalTest extends TaxonomyWebTestCase {
|
||||
|
||||
// Check the created vocabulary.
|
||||
$vocabularies = taxonomy_get_vocabularies();
|
||||
$vid = $vocabularies[count($vocabularies) - 1]->vid;
|
||||
$vocabularies_keys = array_keys($vocabularies);
|
||||
$vid = $vocabularies[end($vocabularies_keys)]->vid;
|
||||
entity_get_controller('taxonomy_vocabulary')->resetCache();
|
||||
$vocabulary = taxonomy_vocabulary_load($vid);
|
||||
$this->assertTrue($vocabulary, 'Vocabulary found in database.');
|
||||
@@ -689,15 +690,20 @@ class TaxonomyTermTestCase extends TaxonomyWebTestCase {
|
||||
$term_objects[$key] = reset($term_objects[$key]);
|
||||
}
|
||||
|
||||
// Test editing the node.
|
||||
$node = $this->drupalGetNodeByTitle($edit["title"]);
|
||||
$this->drupalPost('node/' . $node->nid . '/edit', $edit, t('Save'));
|
||||
foreach ($terms as $term) {
|
||||
$this->assertText($term, 'The term was retained after edit and still appears on the node page.');
|
||||
}
|
||||
|
||||
// Delete term 1.
|
||||
$this->drupalPost('taxonomy/term/' . $term_objects['term1']->tid . '/edit', array(), t('Delete'));
|
||||
$this->drupalPost(NULL, NULL, t('Delete'));
|
||||
$term_names = array($term_objects['term2']->name, $term_objects['term3']->name);
|
||||
|
||||
// Get the node.
|
||||
$node = $this->drupalGetNodeByTitle($edit["title"]);
|
||||
// Get the node and verify that the terms that should be there still are.
|
||||
$this->drupalGet('node/' . $node->nid);
|
||||
|
||||
foreach ($term_names as $term_name) {
|
||||
$this->assertText($term_name, format_string('The term %name appears on the node page after one term %deleted was deleted', array('%name' => $term_name, '%deleted' => $term_objects['term1']->name)));
|
||||
}
|
||||
@@ -722,6 +728,13 @@ class TaxonomyTermTestCase extends TaxonomyWebTestCase {
|
||||
$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.');
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user