summaryrefslogtreecommitdiff
path: root/modules/comment/comment.test
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/comment/comment.test
parent540ee5f4400e33bb202835b61bdefc7f7a280d82 (diff)
downloadbrdo-768208f8ddb2d03bc1e6d484ecac6e78c5fa75a8.tar.gz
brdo-768208f8ddb2d03bc1e6d484ecac6e78c5fa75a8.tar.bz2
- Patch #1076394 by pillarsdotnet: improved test code.
Diffstat (limited to 'modules/comment/comment.test')
-rw-r--r--modules/comment/comment.test6
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/comment/comment.test b/modules/comment/comment.test
index b8fe105e3..26e9b283e 100644
--- a/modules/comment/comment.test
+++ b/modules/comment/comment.test
@@ -1698,7 +1698,7 @@ class CommentTokenReplaceTestCase extends CommentHelperCase {
foreach ($tests as $input => $expected) {
$output = token_replace($input, array('comment' => $comment), array('language' => $language));
- $this->assertFalse(strcmp($output, $expected), t('Sanitized comment token %token replaced.', array('%token' => $input)));
+ $this->assertEqual($output, $expected, t('Sanitized comment token %token replaced.', array('%token' => $input)));
}
// Generate and test unsanitized tokens.
@@ -1714,7 +1714,7 @@ class CommentTokenReplaceTestCase extends CommentHelperCase {
foreach ($tests as $input => $expected) {
$output = token_replace($input, array('comment' => $comment), array('language' => $language, 'sanitize' => FALSE));
- $this->assertFalse(strcmp($output, $expected), t('Unsanitized comment token %token replaced.', array('%token' => $input)));
+ $this->assertEqual($output, $expected, t('Unsanitized comment token %token replaced.', array('%token' => $input)));
}
// Load node so comment_count gets computed.
@@ -1727,7 +1727,7 @@ class CommentTokenReplaceTestCase extends CommentHelperCase {
foreach ($tests as $input => $expected) {
$output = token_replace($input, array('node' => $node), array('language' => $language));
- $this->assertFalse(strcmp($output, $expected), t('Node comment token %token replaced.', array('%token' => $input)));
+ $this->assertEqual($output, $expected, t('Node comment token %token replaced.', array('%token' => $input)));
}
}
}