summaryrefslogtreecommitdiffstats
path: root/application
diff options
context:
space:
mode:
Diffstat (limited to 'application')
-rwxr-xr-xapplication/third_party/test-more-php/Test-More-OO.php19
1 files changed, 14 insertions, 5 deletions
diff --git a/application/third_party/test-more-php/Test-More-OO.php b/application/third_party/test-more-php/Test-More-OO.php
index aa769e3ee..005c7dc01 100755
--- a/application/third_party/test-more-php/Test-More-OO.php
+++ b/application/third_party/test-more-php/Test-More-OO.php
@@ -79,19 +79,28 @@ class TestMore extends TestSimple {
$result = eval("return (\$thing1 $operator \$thing2);");
return $this->ok($result, $name);
- }
+ }
+
+ private function dumpvar($a) {
+ ob_start();
+ var_dump($a);
+ $ret = ob_get_clean();
+ $ret = preg_replace("/^[^\n]*\n/", "", $ret);
+ $ret = preg_replace("/\n$/", "", $ret);
+ return $ret;
+ }
function is ($thing1, $thing2, $name = NULL) {
- $pass = $this->_compare ('==',$thing1,$thing2,$name);
+ $pass = $this->_compare ('===',$thing1,$thing2,$name);
if (!$pass) {
- $this->diag(" got: '$thing1'",
- " expected: '$thing2'");
+ $this->diag(" got: ".$this->dumpvar($thing1)."",
+ " expected: ".$this->dumpvar($thing2)."");
}
return $pass;
}
function isnt ($thing1, $thing2, $name = NULL) {
- $pass = $this->_compare ('!=',$thing1,$thing2,$name);
+ $pass = $this->_compare ('!==',$thing1,$thing2,$name);
if (!$pass) {
$this->diag(" got: '$thing1'",
" expected: '$thing2'");