function MigrationLookupTestCase::prepareContainer

Same name in other branches
  1. 9 core/modules/migrate/tests/src/Unit/process/MigrationLookupTestCase.php \Drupal\Tests\migrate\Unit\process\MigrationLookupTestCase::prepareContainer()
  2. 10 core/modules/migrate/tests/src/Unit/process/MigrationLookupTestCase.php \Drupal\Tests\migrate\Unit\process\MigrationLookupTestCase::prepareContainer()
  3. 11.x 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.

... See full list

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\process

Code

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.