summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2009-11-02 01:49:02 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2009-11-02 01:49:02 +0000
commit7353d5da626649d62ff292e4129727c6f73deaeb (patch)
treeb23408d25b0308533c4ad0ee4bc87fd629c87bb4
parent0884876b83199aa4b48d61e38b87955ff57992e6 (diff)
downloadbrdo-7353d5da626649d62ff292e4129727c6f73deaeb.tar.gz
brdo-7353d5da626649d62ff292e4129727c6f73deaeb.tar.bz2
#582364 by cwgordon7: Add sensible defaults to SimpleTest assert messages.
-rw-r--r--modules/simpletest/drupal_web_test_case.php16
1 files changed, 8 insertions, 8 deletions
diff --git a/modules/simpletest/drupal_web_test_case.php b/modules/simpletest/drupal_web_test_case.php
index 323781b31..985d0c0bd 100644
--- a/modules/simpletest/drupal_web_test_case.php
+++ b/modules/simpletest/drupal_web_test_case.php
@@ -213,7 +213,7 @@ abstract class DrupalTestCase {
* TRUE if the assertion succeeded, FALSE otherwise.
*/
protected function assertTrue($value, $message = '', $group = 'Other') {
- return $this->assert((bool) $value, $message ? $message : t('Value is TRUE'), $group);
+ return $this->assert((bool) $value, $message ? $message : t('Value @value is TRUE.', array('@value' => var_export($value, TRUE))), $group);
}
/**
@@ -229,7 +229,7 @@ abstract class DrupalTestCase {
* TRUE if the assertion succeeded, FALSE otherwise.
*/
protected function assertFalse($value, $message = '', $group = 'Other') {
- return $this->assert(!$value, $message ? $message : t('Value is FALSE'), $group);
+ return $this->assert(!$value, $message ? $message : t('Value @value is FALSE.', array('@value' => var_export($value, TRUE))), $group);
}
/**
@@ -245,7 +245,7 @@ abstract class DrupalTestCase {
* TRUE if the assertion succeeded, FALSE otherwise.
*/
protected function assertNull($value, $message = '', $group = 'Other') {
- return $this->assert(!isset($value), $message ? $message : t('Value is NULL'), $group);
+ return $this->assert(!isset($value), $message ? $message : t('Value @value is NULL.', array('@value' => var_export($value, TRUE))), $group);
}
/**
@@ -261,7 +261,7 @@ abstract class DrupalTestCase {
* TRUE if the assertion succeeded, FALSE otherwise.
*/
protected function assertNotNull($value, $message = '', $group = 'Other') {
- return $this->assert(isset($value), $message ? $message : t('Value is not NULL'), $group);
+ return $this->assert(isset($value), $message ? $message : t('Value @value is not NULL.', array('@value' => var_export($value, TRUE))), $group);
}
/**
@@ -279,7 +279,7 @@ abstract class DrupalTestCase {
* TRUE if the assertion succeeded, FALSE otherwise.
*/
protected function assertEqual($first, $second, $message = '', $group = 'Other') {
- return $this->assert($first == $second, $message ? $message : t('First value is equal to second value'), $group);
+ return $this->assert($first == $second, $message ? $message : t('Value @first is equal to value @second.', array('@first' => var_export($first, TRUE), '@second' => var_export($second, TRUE))), $group);
}
/**
@@ -297,7 +297,7 @@ abstract class DrupalTestCase {
* TRUE if the assertion succeeded, FALSE otherwise.
*/
protected function assertNotEqual($first, $second, $message = '', $group = 'Other') {
- return $this->assert($first != $second, $message ? $message : t('First value is not equal to second value'), $group);
+ return $this->assert($first != $second, $message ? $message : t('Value @first is not equal to value @second.', array('@first' => var_export($first, TRUE), '@second' => var_export($second, TRUE))), $group);
}
/**
@@ -315,7 +315,7 @@ abstract class DrupalTestCase {
* TRUE if the assertion succeeded, FALSE otherwise.
*/
protected function assertIdentical($first, $second, $message = '', $group = 'Other') {
- return $this->assert($first === $second, $message ? $message : t('First value is identical to second value'), $group);
+ return $this->assert($first === $second, $message ? $message : t('Value @first is identical to value @second.', array('@first' => var_export($first, TRUE), '@second' => var_export($second, TRUE))), $group);
}
/**
@@ -333,7 +333,7 @@ abstract class DrupalTestCase {
* TRUE if the assertion succeeded, FALSE otherwise.
*/
protected function assertNotIdentical($first, $second, $message = '', $group = 'Other') {
- return $this->assert($first !== $second, $message ? $message : t('First value is not identical to second value'), $group);
+ return $this->assert($first !== $second, $message ? $message : t('Value @first is not identical to value @second.', array('@first' => var_export($first, TRUE), '@second' => var_export($second, TRUE))), $group);
}
/**