diff options
Diffstat (limited to 'modules/path')
-rw-r--r-- | modules/path/path.test | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/modules/path/path.test b/modules/path/path.test index 66b5c1344..e6a60232b 100644 --- a/modules/path/path.test +++ b/modules/path/path.test @@ -190,15 +190,16 @@ class PathTaxonomyTermTestCase extends DrupalWebTestCase { */ function testTermAlias() { // Create a term in the default 'Tags' vocabulary with URL alias. + $description = $this->randomName();; $edit = array(); $edit['name'] = $this->randomName(); - $edit['description'] = $this->randomName(); + $edit['description[value]'] = $description; $edit['path[alias]'] = $this->randomName(); $this->drupalPost('admin/structure/taxonomy/1/add', $edit, t('Save')); // Confirm that the alias works. $this->drupalGet($edit['path[alias]']); - $this->assertText($edit['description'], 'Term can be accessed on URL alias.'); + $this->assertText($description, 'Term can be accessed on URL alias.'); // Change the term's URL alias. $tid = db_query("SELECT tid FROM {taxonomy_term_data} WHERE name = :name", array(':name' => $edit['name']))->fetchField(); @@ -208,11 +209,11 @@ class PathTaxonomyTermTestCase extends DrupalWebTestCase { // Confirm that the changed alias works. $this->drupalGet($edit2['path[alias]']); - $this->assertText($edit['description'], 'Term can be accessed on changed URL alias.'); + $this->assertText($description, 'Term can be accessed on changed URL alias.'); // Confirm that the old alias no longer works. $this->drupalGet($edit['path[alias]']); - $this->assertNoText($edit['description'], 'Old URL alias has been removed after altering.'); + $this->assertNoText($description, 'Old URL alias has been removed after altering.'); $this->assertResponse(404, 'Old URL alias returns 404.'); // Remove the term's URL alias. @@ -222,7 +223,7 @@ class PathTaxonomyTermTestCase extends DrupalWebTestCase { // Confirm that the alias no longer works. $this->drupalGet($edit2['path[alias]']); - $this->assertNoText($edit['description'], 'Old URL alias has been removed after altering.'); + $this->assertNoText($description, 'Old URL alias has been removed after altering.'); $this->assertResponse(404, 'Old URL alias returns 404.'); } } |