
| Current Path : /var/www/html/store1/web/core/modules/migrate/tests/src/Unit/process/ |
Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 |
| Current File : /var/www/html/store1/web/core/modules/migrate/tests/src/Unit/process/MigrationLookupTestCase.php |
<?php
namespace Drupal\Tests\migrate\Unit\process;
use Drupal\Core\DependencyInjection\ContainerBuilder;
use Drupal\migrate\MigrateLookupInterface;
use Drupal\migrate\MigrateStub;
/**
* Provides container handling for migration lookup unit tests.
*/
abstract class MigrationLookupTestCase extends MigrateProcessTestCase {
/**
* The prophecy of the migrate stub service.
*
* @var \Prophecy\Prophecy\ObjectProphecy
*/
protected $migrateStub;
/**
* The prophecy of the migrate lookup service.
*
* @var \Prophecy\Prophecy\ObjectProphecy
*/
protected $migrateLookup;
/**
* {@inheritdoc}
*/
protected function setUp(): void {
parent::setUp();
$this->migrateStub = $this->prophesize(MigrateStub::class);
$this->migrateLookup = $this->prophesize(MigrateLookupInterface::class);
}
/**
* Prepares and sets the container.
*
* @return \Symfony\Component\DependencyInjection\ContainerInterface
* The prepared container.
*/
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;
}
}