function LegacyBlockVisibilityTest::setUp

Overrides MigrateProcessTestCase::setUp

File

core/modules/block/tests/src/Unit/Plugin/migrate/process/LegacyBlockVisibilityTest.php, line 33

Class

LegacyBlockVisibilityTest
Tests the block_visibility process plugin.

Namespace

Drupal\Tests\block\Unit\Plugin\migrate\process

Code

protected function setUp() {
    parent::setUp();
    $migrate_lookup = $this->prophesize(MigrateLookupInterface::class);
    $container = new ContainerBuilder();
    $container->set('migrate.lookup', $migrate_lookup->reveal());
    \Drupal::setContainer($container);
    $this->moduleHandler = $this->prophesize(ModuleHandlerInterface::class);
    $migration_plugin = $this->prophesize(MigrateProcessInterface::class);
    $this->plugin = new BlockVisibility([], 'block_visibility_pages', [], $this->moduleHandler
        ->reveal(), $migration_plugin->reveal());
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.