class MigrationLookupTestCase
Same name and namespace in other branches
- 11.x core/modules/migrate/tests/src/Unit/process/MigrationLookupTestCase.php \Drupal\Tests\migrate\Unit\process\MigrationLookupTestCase
Provides container handling for migration lookup unit tests.
Hierarchy
- class \Drupal\Tests\UnitTestCase uses \Drupal\Tests\Traits\PhpUnitWarnings, \Drupal\Tests\PhpUnitCompatibilityTrait, \Symfony\Bridge\PhpUnit\ExpectDeprecationTrait implements \PHPUnit\Framework\TestCase
- class \Drupal\Tests\migrate\Unit\MigrateTestCase implements \Drupal\Tests\UnitTestCase
- class \Drupal\Tests\migrate\Unit\process\MigrateProcessTestCase implements \Drupal\Tests\migrate\Unit\MigrateTestCase
- class \Drupal\Tests\migrate\Unit\process\MigrationLookupTestCase implements \Drupal\Tests\migrate\Unit\process\MigrateProcessTestCase
- class \Drupal\Tests\migrate\Unit\process\MigrateProcessTestCase implements \Drupal\Tests\migrate\Unit\MigrateTestCase
- class \Drupal\Tests\migrate\Unit\MigrateTestCase implements \Drupal\Tests\UnitTestCase
Expanded class hierarchy of MigrationLookupTestCase
File
-
core/
modules/ migrate/ tests/ src/ Unit/ process/ MigrationLookupTestCase.php, line 12
Namespace
Drupal\Tests\migrate\Unit\processView source
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() {
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;
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.