$this->
installConfig(['node', 'user'
]);
$this->
createContentType(['type' => 'node_lookup'
]);
} /**
* Tests scenarios around single id lookups.
*/
public function testSingleLookup() { $this->
executeMigration('sample_lookup_migration'
);
// Test numerically indexed source id.
$result =
$this->migrateLookup->
lookup('sample_lookup_migration',
[17
]);
$this->
assertSame('1',
$result[0
]['nid'
]);
// Test associatively indexed source id.
$result =
$this->migrateLookup->
lookup('sample_lookup_migration',
['id' => 25
]);
$this->
assertSame('2',
$result[0
]['nid'
]);
// Test lookup not found.
$result =
$this->migrateLookup->
lookup('sample_lookup_migration',
[1337
]);
$this->
assertSame([],
$result);
}