Issue #3017119 by phenaproxima: SourcePluginBase::next() calls Row constructor incorrectly
parent
b33232b7d2
commit
30cfcd03d0
|
@ -353,7 +353,7 @@ abstract class SourcePluginBase extends PluginBase implements MigrateSourceInter
|
||||||
|
|
||||||
$row_data = $this->getIterator()->current() + $this->configuration;
|
$row_data = $this->getIterator()->current() + $this->configuration;
|
||||||
$this->fetchNextRow();
|
$this->fetchNextRow();
|
||||||
$row = new Row($row_data, $this->migration->getSourcePlugin()->getIds(), $this->migration->getDestinationIds());
|
$row = new Row($row_data, $this->getIds());
|
||||||
|
|
||||||
// Populate the source key for this row.
|
// Populate the source key for this row.
|
||||||
$this->currentSourceIds = $row->getSourceIdValues();
|
$this->currentSourceIds = $row->getSourceIdValues();
|
||||||
|
|
|
@ -45,6 +45,11 @@ class MigrateEmbeddedDataTest extends KernelTestBase {
|
||||||
$results = [];
|
$results = [];
|
||||||
/** @var \Drupal\migrate\Row $row */
|
/** @var \Drupal\migrate\Row $row */
|
||||||
foreach ($source as $row) {
|
foreach ($source as $row) {
|
||||||
|
// The plugin should not mark any rows as stubs. We need to use
|
||||||
|
// assertSame() here because assertFalse() will pass falsy values (e.g.,
|
||||||
|
// empty arrays).
|
||||||
|
$this->assertSame(FALSE, $row->isStub());
|
||||||
|
|
||||||
$data_row = $row->getSource();
|
$data_row = $row->getSource();
|
||||||
// The "data" row returned by getSource() also includes all source
|
// The "data" row returned by getSource() also includes all source
|
||||||
// configuration - we remove it so we see only the data itself.
|
// configuration - we remove it so we see only the data itself.
|
||||||
|
|
Loading…
Reference in New Issue