function MenuLinkParentTest::setUp

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

Class

MenuLinkParentTest
Tests the menu link parent process plugin.

Namespace

Drupal\Tests\migrate\Unit\process

Code

protected function setUp() : void {
    parent::setUp();
    $this->migration = $this->prophesize(MigrationInterface::class);
    $this->migrateLookup = $this->prophesize(MigrateLookupInterface::class);
    $this->menuLinkManager = $this->prophesize(MenuLinkManagerInterface::class);
    $this->menuLinkStorage = $this->prophesize(EntityStorageInterface::class);
    $container = new ContainerBuilder();
    $container->set('migrate.lookup', $this->migrateLookup
        ->reveal());
    $this->pathValidator = $this->prophesize(PathValidatorInterface::class);
    $container->set('path.validator', $this->pathValidator
        ->reveal());
    \Drupal::setContainer($container);
}

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