Skip to content
Snippets Groups Projects
Unverified Commit 9b485b8d authored by Alex Pott's avatar Alex Pott
Browse files

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

parent ff094150
Branches
Tags
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -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);
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment