Skip to content

Commit c0aca6e

Browse files
committed
Issue #3025685 by quietone: Add error msg to assertions in MigrateSourceTestBase
(cherry picked from commit 9b485b8)
1 parent cf5c098 commit c0aca6e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

modules/migrate/tests/src/Kernel/MigrateSourceTestBase.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,13 +175,14 @@ public function testSource(array $source_data, array $expected_data, $expected_c
175175
foreach ($expected as $key => $value) {
176176
$this->assertArrayHasKey($key, $actual);
177177

178+
$msg = sprintf("Value at 'array[%s][%s]' is not correct.", $i - 1, $key);
178179
if (is_array($value)) {
179180
ksort($value);
180181
ksort($actual[$key]);
181-
$this->assertEquals($value, $actual[$key]);
182+
$this->assertEquals($value, $actual[$key], $msg);
182183
}
183184
else {
184-
$this->assertSame((string) $value, (string) $actual[$key]);
185+
$this->assertEquals((string) $value, (string) $actual[$key], $msg);
185186
}
186187
}
187188
}

0 commit comments

Comments
 (0)