You are here

protected function MenuLinkParentTest::setUp in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/migrate/tests/src/Unit/process/MenuLinkParentTest.php \Drupal\Tests\migrate\Unit\process\MenuLinkParentTest::setUp()
  2. 10 core/modules/migrate/tests/src/Unit/process/MenuLinkParentTest.php \Drupal\Tests\migrate\Unit\process\MenuLinkParentTest::setUp()

Overrides MigrateProcessTestCase::setUp

File

core/modules/migrate/tests/src/Unit/process/MenuLinkParentTest.php, line 55

Class

MenuLinkParentTest
Tests the menu link parent process plugin.

Namespace

Drupal\Tests\migrate\Unit\process

Code

protected function setUp() {
  parent::setUp();
  $this->migration = $this
    ->prophesize(MigrationInterface::class);
  $this->migrateLookup = $this
    ->prophesize(MigrateLookupInterface::class);
  $this->migrateLookup
    ->lookup(NULL, [
    1,
  ])
    ->willReturn([]);
  $this->menuLinkManager = $this
    ->prophesize(MenuLinkManagerInterface::class);
  $this->menuLinkStorage = $this
    ->prophesize(EntityStorageInterface::class);
  $container = new ContainerBuilder();
  $container
    ->set('migrate.lookup', $this->migrateLookup
    ->reveal());
  \Drupal::setContainer($container);
}