summaryrefslogtreecommitdiff
path: root/modules/taxonomy
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2011-02-28 20:36:37 -0500
committerDries Buytaert <dries@buytaert.net>2011-02-28 20:36:37 -0500
commit768208f8ddb2d03bc1e6d484ecac6e78c5fa75a8 (patch)
treef7f428f07922e354fe47f169605e67d581c5f1ed /modules/taxonomy
parent540ee5f4400e33bb202835b61bdefc7f7a280d82 (diff)
downloadbrdo-768208f8ddb2d03bc1e6d484ecac6e78c5fa75a8.tar.gz
brdo-768208f8ddb2d03bc1e6d484ecac6e78c5fa75a8.tar.bz2
- Patch #1076394 by pillarsdotnet: improved test code.
Diffstat (limited to 'modules/taxonomy')
-rw-r--r--modules/taxonomy/taxonomy.test10
1 files changed, 5 insertions, 5 deletions
diff --git a/modules/taxonomy/taxonomy.test b/modules/taxonomy/taxonomy.test
index 1456af307..a6ac332dc 100644
--- a/modules/taxonomy/taxonomy.test
+++ b/modules/taxonomy/taxonomy.test
@@ -1107,7 +1107,7 @@ class TaxonomyTokenReplaceTestCase extends TaxonomyWebTestCase {
foreach ($tests as $input => $expected) {
$output = token_replace($input, array('term' => $term1), array('language' => $language));
- $this->assertFalse(strcmp($output, $expected), t('Sanitized taxonomy term token %token replaced.', array('%token' => $input)));
+ $this->assertEqual($output, $expected, t('Sanitized taxonomy term token %token replaced.', array('%token' => $input)));
}
// Generate and test sanitized tokens for term2.
@@ -1127,7 +1127,7 @@ class TaxonomyTokenReplaceTestCase extends TaxonomyWebTestCase {
foreach ($tests as $input => $expected) {
$output = token_replace($input, array('term' => $term2), array('language' => $language));
- $this->assertFalse(strcmp($output, $expected), t('Sanitized taxonomy term token %token replaced.', array('%token' => $input)));
+ $this->assertEqual($output, $expected, t('Sanitized taxonomy term token %token replaced.', array('%token' => $input)));
}
// Generate and test unsanitized tokens.
@@ -1138,7 +1138,7 @@ class TaxonomyTokenReplaceTestCase extends TaxonomyWebTestCase {
foreach ($tests as $input => $expected) {
$output = token_replace($input, array('term' => $term2), array('language' => $language, 'sanitize' => FALSE));
- $this->assertFalse(strcmp($output, $expected), t('Unsanitized taxonomy term token %token replaced.', array('%token' => $input)));
+ $this->assertEqual($output, $expected, t('Unsanitized taxonomy term token %token replaced.', array('%token' => $input)));
}
// Generate and test sanitized tokens.
@@ -1154,7 +1154,7 @@ class TaxonomyTokenReplaceTestCase extends TaxonomyWebTestCase {
foreach ($tests as $input => $expected) {
$output = token_replace($input, array('vocabulary' => $this->vocabulary), array('language' => $language));
- $this->assertFalse(strcmp($output, $expected), t('Sanitized taxonomy vocabulary token %token replaced.', array('%token' => $input)));
+ $this->assertEqual($output, $expected, t('Sanitized taxonomy vocabulary token %token replaced.', array('%token' => $input)));
}
// Generate and test unsanitized tokens.
@@ -1163,7 +1163,7 @@ class TaxonomyTokenReplaceTestCase extends TaxonomyWebTestCase {
foreach ($tests as $input => $expected) {
$output = token_replace($input, array('vocabulary' => $this->vocabulary), array('language' => $language, 'sanitize' => FALSE));
- $this->assertFalse(strcmp($output, $expected), t('Unsanitized taxonomy vocabulary token %token replaced.', array('%token' => $input)));
+ $this->assertEqual($output, $expected, t('Unsanitized taxonomy vocabulary token %token replaced.', array('%token' => $input)));
}
}
}