LegacyMigrationLookupTest.php in Drupal 8
File
core/modules/migrate/tests/src/Unit/process/LegacyMigrationLookupTest.php
View source
<?php
namespace Drupal\Tests\migrate\Unit\process;
use Drupal\migrate\Plugin\migrate\process\MigrationLookup;
use Drupal\migrate\Plugin\MigrationInterface;
class LegacyMigrationLookupTest extends MigrationLookupTestCase {
public function testCreateStubRow() {
$this
->prepareContainer();
$lookup = MigrationLookup::create($this
->prepareContainer(), [], '', [], $this
->prophesize(MigrationInterface::class)
->reveal());
$method = new \ReflectionMethod($lookup, 'createStubRow');
$method
->setAccessible(TRUE);
$row = $method
->invoke($lookup, [
'id' => 1,
'value' => 'test',
], [
'id' => [
'type' => 'integer',
],
]);
$this
->assertTrue($row
->isStub());
$this
->assertSame('test', $row
->get('value'));
}
}