summaryrefslogtreecommitdiff
path: root/modules/taxonomy
diff options
context:
space:
mode:
authorwebchick <webchick@24967.no-reply.drupal.org>2012-04-30 22:07:59 -0700
committerwebchick <webchick@24967.no-reply.drupal.org>2012-04-30 22:07:59 -0700
commit36541c978c2127f21ee6fef5210ad3157717e901 (patch)
tree1b4ff3701a98ca0db4e67ea24f565b6d66a64955 /modules/taxonomy
parent45589029ed1d4b424aeff60e87c112e586ececc2 (diff)
downloadbrdo-36541c978c2127f21ee6fef5210ad3157717e901.tar.gz
brdo-36541c978c2127f21ee6fef5210ad3157717e901.tar.bz2
Issue #1542674 by bas.hr, tim.plunkett, damiankloip: Fixed Wrong count assertion in taxonomy.test.
Diffstat (limited to 'modules/taxonomy')
-rw-r--r--modules/taxonomy/taxonomy.test14
1 files changed, 7 insertions, 7 deletions
diff --git a/modules/taxonomy/taxonomy.test b/modules/taxonomy/taxonomy.test
index bca75caae..42b4d4767 100644
--- a/modules/taxonomy/taxonomy.test
+++ b/modules/taxonomy/taxonomy.test
@@ -215,7 +215,7 @@ class TaxonomyVocabularyTestCase extends TaxonomyWebTestCase {
// This should return a vocabulary object since it now matches a real vid.
$vocabulary = taxonomy_vocabulary_load($vid);
$this->assertTrue(!empty($vocabulary) && is_object($vocabulary), t('Vocabulary is an object'));
- $this->assertTrue($vocabulary->vid == $vid, t('Valid vocabulary vid is the same as our previously invalid one.'));
+ $this->assertEqual($vocabulary->vid, $vid, 'Valid vocabulary vid is the same as our previously invalid one.');
}
/**
@@ -319,10 +319,10 @@ class TaxonomyVocabularyTestCase extends TaxonomyWebTestCase {
// Fetch vocabulary 1 by name.
$vocabulary = current(taxonomy_vocabulary_load_multiple(array(), array('name' => $vocabulary1->name)));
- $this->assertTrue($vocabulary->vid == $vocabulary1->vid, t('Vocabulary loaded successfully by name.'));
+ $this->assertEqual($vocabulary->vid, $vocabulary1->vid, 'Vocabulary loaded successfully by name.');
// Fetch vocabulary 1 by name and ID.
- $this->assertTrue(current(taxonomy_vocabulary_load_multiple(array($vocabulary1->vid), array('name' => $vocabulary1->name)))->vid == $vocabulary1->vid, t('Vocabulary loaded successfully by name and ID.'));
+ $this->assertEqual(current(taxonomy_vocabulary_load_multiple(array($vocabulary1->vid), array('name' => $vocabulary1->name)))->vid, $vocabulary1->vid, 'Vocabulary loaded successfully by name and ID.');
}
/**
@@ -1327,11 +1327,11 @@ class TaxonomyLoadMultipleTestCase extends TaxonomyWebTestCase {
// Load the terms from the vocabulary.
$terms = taxonomy_term_load_multiple(NULL, array('vid' => $vocabulary->vid));
$count = count($terms);
- $this->assertTrue($count == 5, t('Correct number of terms were loaded. !count terms.', array('!count' => $count)));
+ $this->assertEqual($count, 5, format_string('Correct number of terms were loaded. !count terms.', array('!count' => $count)));
// Load the same terms again by tid.
$terms2 = taxonomy_term_load_multiple(array_keys($terms));
- $this->assertTrue($count == count($terms2), t('Five terms were loaded by tid'));
+ $this->assertEqual($count, count($terms2), 'Five terms were loaded by tid');
$this->assertEqual($terms, $terms2, t('Both arrays contain the same terms'));
// Load the terms by tid, with a condition on vid.
@@ -1346,7 +1346,7 @@ class TaxonomyLoadMultipleTestCase extends TaxonomyWebTestCase {
// Load terms from the vocabulary by vid.
$terms4 = taxonomy_term_load_multiple(NULL, array('vid' => $vocabulary->vid));
- $this->assertTrue(count($terms4 == 4), t('Correct number of terms were loaded.'));
+ $this->assertEqual(count($terms4), 4, 'Correct number of terms were loaded.');
$this->assertFalse(isset($terms4[$deleted->tid]));
// Create a single term and load it by name.
@@ -1673,7 +1673,7 @@ class TaxonomyTermFieldMultipleVocabularyTestCase extends TaxonomyWebTestCase {
// Verify that field and instance settings are correct.
$field_info = field_info_field($this->field_name);
- $this->assertTrue(sizeof($field_info['settings']['allowed_values']) == 1, 'Only one vocabulary is allowed for the field.');
+ $this->assertEqual(sizeof($field_info['settings']['allowed_values']), 1, 'Only one vocabulary is allowed for the field.');
// The widget should still be displayed.
$this->drupalGet('test-entity/add/test-bundle');