$this->
installEntitySchema('user'
);
$this->
installSchema('node', 'node_access'
);
$this->
installConfig(['node', 'user'
]);
$this->
createContentType(['type' => 'node_lookup'
]);
} /**
* Tests stub creation.
*/
public function testCreateStub() { $this->
assertSame([],
$this->migrateLookup->
lookup('sample_stubbing_migration',
[17
]));
$ids =
$this->migrateStub->
createStub('sample_stubbing_migration',
[17
]);
$this->
assertSame([$ids],
$this->migrateLookup->
lookup('sample_stubbing_migration',
[17
]));
$this->
assertNotNull(\Drupal::
entityTypeManager()->
getStorage('node'
)->
load($ids['nid'
]));
} /**
* Tests raw stub creation.
*/
public function testCreateStubRawReturn() { $this->
assertSame([],
$this->migrateLookup->
lookup('sample_stubbing_migration',
[17
]));
$ids =
$this->migrateStub->
createStub('sample_stubbing_migration',
[17
],
[], FALSE
);
$this->
assertSame($ids,
[$this->migrateLookup->
lookup('sample_stubbing_migration',
[17
])[0
]['nid'
]]);