fixed diffing of arrays if an assert_equals fails
This commit is contained in:
parent
c6f53114a3
commit
7d6185873d
1 changed files with 6 additions and 0 deletions
|
@ -16,6 +16,12 @@ class UnitTestCase
|
||||||
if(PHP_SAPI === "cli"){
|
if(PHP_SAPI === "cli"){
|
||||||
$seperator = "\n";
|
$seperator = "\n";
|
||||||
}
|
}
|
||||||
|
if(is_array($value)){
|
||||||
|
$value = var_export($value, true);
|
||||||
|
}
|
||||||
|
if(is_array($value2)){
|
||||||
|
$value2 = var_export($value2, true);
|
||||||
|
}
|
||||||
$message = "$seperator Value1: $value $seperator != $seperator Value2: $value2 $seperator";
|
$message = "$seperator Value1: $value $seperator != $seperator Value2: $value2 $seperator";
|
||||||
$this->_fail($message);
|
$this->_fail($message);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue