MigrationLookupTestCase.php in Drupal 10
File
core/modules/migrate/tests/src/Unit/process/MigrationLookupTestCase.php
View source
<?php
namespace Drupal\Tests\migrate\Unit\process;
use Drupal\Core\DependencyInjection\ContainerBuilder;
use Drupal\migrate\MigrateLookupInterface;
use Drupal\migrate\MigrateStub;
abstract class MigrationLookupTestCase extends MigrateProcessTestCase {
protected $migrateStub;
protected $migrateLookup;
protected function setUp() : void {
parent::setUp();
$this->migrateStub = $this
->prophesize(MigrateStub::class);
$this->migrateLookup = $this
->prophesize(MigrateLookupInterface::class);
}
protected function prepareContainer() {
$container = new ContainerBuilder();
$container
->set('migrate.stub', $this->migrateStub
->reveal());
$container
->set('migrate.lookup', $this->migrateLookup
->reveal());
\Drupal::setContainer($container);
return $container;
}
}