static function compare_arrays($expected, $test, $context)
{
$tested_data = array();
foreach ($expected as $key => $value) {
if (isset($test[$key])) {
$tested_data[$key] = $test[$key];
} else {
$tested_data[$key] = null;
}
}
if (is_object($context)) {
$context->assertEquals($expected, $tested_data);
} else {
return $tested_data;
}
}