summaryrefslogtreecommitdiff
path: root/modules/taxonomy
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2009-08-03 20:19:29 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2009-08-03 20:19:29 +0000
commit2e34decb3bd4bfdbba54316d79154c24cc78bb6f (patch)
tree4a1a03dba3d4ecf40f06d5715834fb4dab95d88c /modules/taxonomy
parenta1202e744f7cd6c40038afbe635aa9f59cf60778 (diff)
downloadbrdo-2e34decb3bd4bfdbba54316d79154c24cc78bb6f.tar.gz
brdo-2e34decb3bd4bfdbba54316d79154c24cc78bb6f.tar.bz2
#537044 by dropcube: Simplify and expand taxonomy hook tests.
Diffstat (limited to 'modules/taxonomy')
-rw-r--r--modules/taxonomy/taxonomy.test12
1 files changed, 6 insertions, 6 deletions
diff --git a/modules/taxonomy/taxonomy.test b/modules/taxonomy/taxonomy.test
index 8c97a1f96..89e3912db 100644
--- a/modules/taxonomy/taxonomy.test
+++ b/modules/taxonomy/taxonomy.test
@@ -705,26 +705,26 @@ class TaxonomyHooksTestCase extends TaxonomyWebTestCase {
// Create a term with one antonym.
$edit = array(
'name' => $this->randomName(),
- 'antonyms' => 'Long',
+ 'antonym' => 'Long',
);
$this->drupalPost('admin/structure/taxonomy/' . $vocabulary->vid . '/add', $edit, t('Save'));
$term = reset(taxonomy_get_term_by_name($edit['name']));
- $this->assertEqual($term->antonyms[0], $edit['antonyms'], t('Antonyms were loaded into the term object'));
+ $this->assertEqual($term->antonym, $edit['antonym'], t('Antonym was loaded into the term object'));
// Update the term with a different antonym.
$edit = array(
'name' => $this->randomName(),
- 'antonyms' => 'Short',
+ 'antonym' => 'Short',
);
$this->drupalPost('taxonomy/term/' . $term->tid . '/edit', $edit, t('Save'));
taxonomy_terms_static_reset();
$term = taxonomy_term_load($term->tid);
- $this->assertTrue(in_array($edit['antonyms'], $term->antonyms), t('Antonym was successfully edited'));
+ $this->assertEqual($edit['antonym'], $term->antonym, t('Antonym was successfully edited'));
// Delete the term.
taxonomy_term_delete($term->tid);
- $antonyms = db_query('SELECT taid FROM {term_antonym} WHERE tid = :tid', array(':tid' => $term->tid))->fetchField();
- $this->assertFalse($antonyms, t('The antonyms were deleted from the database.'));
+ $antonym = db_query('SELECT tid FROM {taxonomy_term_antonym} WHERE tid = :tid', array(':tid' => $term->tid))->fetchField();
+ $this->assertFalse($antonym, t('The antonym were deleted from the database.'));
}
}