You are here

protected function LegacyBlockVisibilityTest::setUp in Drupal 8

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());
}