protected function MigrationLookupTestCase::prepareContainer in Drupal 8
Same name and namespace in other branches
- 9 core/modules/migrate/tests/src/Unit/process/MigrationLookupTestCase.php \Drupal\Tests\migrate\Unit\process\MigrationLookupTestCase::prepareContainer()
Prepares and sets the container.
Return value
\Symfony\Component\DependencyInjection\ContainerInterface The prepared container.
11 calls to MigrationLookupTestCase::prepareContainer()
- LegacyMigrationLookupTest::testCreateStubRow in core/modules/ migrate/ tests/ src/ Unit/ process/ LegacyMigrationLookupTest.php 
- Tests ::createStubRow()
- MigrationLookupTest::testMultipleSourceIds in core/modules/ migrate/ tests/ src/ Unit/ process/ MigrationLookupTest.php 
- Tests processing multiple source IDs.
- MigrationLookupTest::testNoSkipValid in core/modules/ migrate/ tests/ src/ Unit/ process/ MigrationLookupTest.php 
- Test that valid, but technically empty values are not skipped.
- MigrationLookupTest::testSkipInvalid in core/modules/ migrate/ tests/ src/ Unit/ process/ MigrationLookupTest.php 
- Tests that processing is skipped when the input value is invalid.
- MigrationLookupTest::testSuccessfulLookup in core/modules/ migrate/ tests/ src/ Unit/ process/ MigrationLookupTest.php 
- Tests a successful lookup.
File
- core/modules/ migrate/ tests/ src/ Unit/ process/ MigrationLookupTestCase.php, line 43 
Class
- MigrationLookupTestCase
- Provides container handling for migration lookup unit tests.
Namespace
Drupal\Tests\migrate\Unit\processCode
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;
}