mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-01-30 21:03:30 +01:00
Fix phpunit
This commit is contained in:
@@ -183,22 +183,18 @@ class FactureRecTest extends PHPUnit\Framework\TestCase
|
||||
{
|
||||
$retAr=array();
|
||||
|
||||
if (get_class($oA) !== get_class($oB))
|
||||
{
|
||||
if (get_class($oA) !== get_class($oB)) {
|
||||
$retAr[]="Supplied objects are not of same class.";
|
||||
} else {
|
||||
$oVarsA=get_object_vars($oA);
|
||||
$oVarsB=get_object_vars($oB);
|
||||
$aKeys=array_keys($oVarsA);
|
||||
foreach ($aKeys as $sKey)
|
||||
{
|
||||
foreach ($aKeys as $sKey) {
|
||||
if (in_array($sKey, $fieldstoignorearray)) continue;
|
||||
if (! $ignoretype && $oVarsA[$sKey] !== $oVarsB[$sKey])
|
||||
{
|
||||
if (! $ignoretype && ($oVarsA[$sKey] !== $oVarsB[$sKey])) {
|
||||
$retAr[]=$sKey.' : '.(is_object($oVarsA[$sKey])?get_class($oVarsA[$sKey]):$oVarsA[$sKey]).' <> '.(is_object($oVarsB[$sKey])?get_class($oVarsB[$sKey]):$oVarsB[$sKey]);
|
||||
}
|
||||
if ($ignoretype && $oVarsA[$sKey] != $oVarsB[$sKey])
|
||||
{
|
||||
if ($ignoretype && ($oVarsA[$sKey] != $oVarsB[$sKey])) {
|
||||
$retAr[]=$sKey.' : '.(is_object($oVarsA[$sKey])?get_class($oVarsA[$sKey]):$oVarsA[$sKey]).' <> '.(is_object($oVarsB[$sKey])?get_class($oVarsB[$sKey]):$oVarsB[$sKey]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user