Unverified Commit bdb2125f authored by alexpott's avatar alexpott

Issue #3025685 by quietone: Add error msg to assertions in MigrateSourceTestBase

(cherry picked from commit 9b485b8d)
parent 78069629
......@@ -175,13 +175,14 @@ public function testSource(array $source_data, array $expected_data, $expected_c
foreach ($expected as $key => $value) {
$this->assertArrayHasKey($key, $actual);
$msg = sprintf("Value at 'array[%s][%s]' is not correct.", $i - 1, $key);
if (is_array($value)) {
ksort($value);
ksort($actual[$key]);
$this->assertEquals($value, $actual[$key]);
$this->assertEquals($value, $actual[$key], $msg);
}
else {
$this->assertSame((string) $value, (string) $actual[$key]);
$this->assertEquals((string) $value, (string) $actual[$key], $msg);
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment