diff options
Diffstat (limited to 'modules/simpletest')
-rw-r--r-- | modules/simpletest/drupal_web_test_case.php | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/modules/simpletest/drupal_web_test_case.php b/modules/simpletest/drupal_web_test_case.php index 626f7383b..b5394bfc2 100644 --- a/modules/simpletest/drupal_web_test_case.php +++ b/modules/simpletest/drupal_web_test_case.php @@ -105,7 +105,7 @@ class DrupalWebTestCase { * The status passed in. */ protected function assertTrue($value, $message = '', $group = 'Other') { - return $this->_assert((bool) $value, $message ? $message : t('%value is TRUE', array('%value' => $value)), $group); + return $this->_assert((bool) $value, $message ? $message : t('Value is TRUE'), $group); } /** @@ -121,7 +121,7 @@ class DrupalWebTestCase { * The status passed in. */ protected function assertFalse($value, $message = '', $group = 'Other') { - return $this->_assert(!$value, $message ? $message : t('%value is FALSE', array('%value' => $value)), $group); + return $this->_assert(!$value, $message ? $message : t('Value is FALSE'), $group); } /** @@ -137,7 +137,7 @@ class DrupalWebTestCase { * The status passed in. */ protected function assertNull($value, $message = '', $group = 'Other') { - return $this->_assert(!isset($value), $message ? $message : t('%value is NULL', array('%value' => $value)), $group); + return $this->_assert(!isset($value), $message ? $message : t('Value is NULL'), $group); } /** @@ -153,7 +153,7 @@ class DrupalWebTestCase { * The status passed in. */ protected function assertNotNull($value, $message = '', $group = 'Other') { - return $this->_assert(isset($value), $message ? $message : t('%value is not NULL', array('%value' => $value)), $group); + return $this->_assert(isset($value), $message ? $message : t('Value is not NULL'), $group); } /** @@ -171,7 +171,7 @@ class DrupalWebTestCase { * The status passed in. */ protected function assertEqual($first, $second, $message = '', $group = 'Other') { - return $this->_assert($first == $second, $message ? $message : t('%first is equal to %second', array('%first' => $first, '%second' => $second)), $group); + return $this->_assert($first == $second, $message ? $message : t('First value is equal to second value'), $group); } /** @@ -189,7 +189,7 @@ class DrupalWebTestCase { * The status passed in. */ protected function assertNotEqual($first, $second, $message = '', $group = 'Other') { - return $this->_assert($first != $second, $message ? $message : t('%first is not equal to %second', array('%first' => $first, '%second' => $second)), $group); + return $this->_assert($first != $second, $message ? $message : t('First value is not equal to second value'), $group); } /** @@ -207,7 +207,7 @@ class DrupalWebTestCase { * The status passed in. */ protected function assertIdentical($first, $second, $message = '', $group = 'Other') { - return $this->_assert($first === $second, $message ? $message : t('%first is identical to %second', array('%first' => $first, '%second' => $second)), $group); + return $this->_assert($first === $second, $message ? $message : t('First value is identical to second value'), $group); } /** @@ -225,7 +225,7 @@ class DrupalWebTestCase { * The status passed in. */ protected function assertNotIdentical($first, $second, $message = '', $group = 'Other') { - return $this->_assert($first !== $second, $message ? $message : t('%first is not identical to %second', array('%first' => $first, '%second' => $second)), $group); + return $this->_assert($first !== $second, $message ? $message : t('First value is not identical to second value'), $group); } /** @@ -1254,7 +1254,7 @@ class DrupalWebTestCase { * @return * TRUE on pass, FALSE on fail. */ - function assertRaw($raw, $message = "%s", $group = 'Other') { + function assertRaw($raw, $message = '%s found', $group = 'Other') { return $this->_assert(strpos($this->_content, $raw) !== FALSE, $message, $group); } @@ -1271,7 +1271,7 @@ class DrupalWebTestCase { * @return * TRUE on pass, FALSE on fail. */ - function assertNoRaw($raw, $message = "%s", $group = 'Other') { + function assertNoRaw($raw, $message = '%s found', $group = 'Other') { return $this->_assert(strpos($this->_content, $raw) === FALSE, $message, $group); } @@ -1332,7 +1332,7 @@ class DrupalWebTestCase { $this->plain_text = filter_xss($this->_content, array()); } if (!$message) { - $message = '"' . $text . '"' . ($not_exists ? ' not found.' : ' found.'); + $message = '"' . $text . '"' . ($not_exists ? ' not found' : ' found'); } return $this->_assert($not_exists == (strpos($this->plain_text, $text) === FALSE), $message, $group); } @@ -1349,7 +1349,7 @@ class DrupalWebTestCase { * @return * TRUE on pass, FALSE on fail. */ - function assertPattern($pattern, $message = '%s', $group = 'Other') { + function assertPattern($pattern, $message = 'Pattern %s found', $group = 'Other') { return $this->_assert((bool) preg_match($pattern, $this->drupalGetContent()), $message, $group); } @@ -1365,7 +1365,7 @@ class DrupalWebTestCase { * @return * TRUE on pass, FALSE on fail. */ - function assertNoPattern($pattern, $message = '%s', $group = 'Other') { + function assertNoPattern($pattern, $message = 'Pattern %s not found', $group = 'Other') { return $this->_assert(!preg_match($pattern, $this->drupalGetContent()), $message, $group); } |