_compare() protected method

Compare the expected with the result. If $result is null $expected equals $type and $result equals $expected.
protected _compare ( string $type, mixed $expected, mixed $result = null, string $trace = null ) : array
$type string The type of comparison either `'identical'` or `'equal'` (default).
$expected mixed The expected value.
$result mixed An optional result value, defaults to `null`
$trace string An optional trace used internally to track arrays and objects, defaults to `null`.
return array Data with the keys `trace'`, `'expected'` and `'result'`.
 public function compare($type, $expected, $result = null, $trace = null)
 {
     return parent::_compare($type, $expected, $result, $trace);
 }