reverted: --- b/core/modules/migrate/tests/src/Kernel/MigrateSourceTestBase.php +++ a/core/modules/migrate/tests/src/Kernel/MigrateSourceTestBase.php @@ -158,8 +158,8 @@ $expected_count = count($expected_data); } // If an expected count was given, assert it only if the plugin is + // countable. + if (is_numeric($expected_count)) { - // countable and there is no high water mark. - if (is_numeric($expected_count) && !isset($high_water)) { $this->assertInstanceOf('\Iterator', $plugin); $this->assertSame($expected_count, iterator_count($plugin)); } @@ -185,10 +185,6 @@ } } } - - if (isset($high_water)) { - $this->assertSame($expected_count, $i); - } } }