function MigrateExecutableTest::setUp

Same name in this branch
  1. 10 core/modules/migrate/tests/src/Kernel/MigrateExecutableTest.php \Drupal\Tests\migrate\Kernel\MigrateExecutableTest::setUp()
Same name in other branches
  1. 9 core/modules/migrate/tests/src/Unit/MigrateExecutableTest.php \Drupal\Tests\migrate\Unit\MigrateExecutableTest::setUp()
  2. 9 core/modules/migrate/tests/src/Kernel/MigrateExecutableTest.php \Drupal\Tests\migrate\Kernel\MigrateExecutableTest::setUp()
  3. 8.9.x core/modules/migrate/tests/src/Unit/MigrateExecutableTest.php \Drupal\Tests\migrate\Unit\MigrateExecutableTest::setUp()
  4. 8.9.x core/modules/migrate/tests/src/Kernel/MigrateExecutableTest.php \Drupal\Tests\migrate\Kernel\MigrateExecutableTest::setUp()
  5. 11.x core/modules/migrate/tests/src/Unit/MigrateExecutableTest.php \Drupal\Tests\migrate\Unit\MigrateExecutableTest::setUp()
  6. 11.x core/modules/migrate/tests/src/Kernel/MigrateExecutableTest.php \Drupal\Tests\migrate\Kernel\MigrateExecutableTest::setUp()

Overrides UnitTestCase::setUp

File

core/modules/migrate/tests/src/Unit/MigrateExecutableTest.php, line 69

Class

MigrateExecutableTest
@coversDefaultClass \Drupal\migrate\MigrateExecutable @group migrate

Namespace

Drupal\Tests\migrate\Unit

Code

protected function setUp() : void {
    parent::setUp();
    static::$idMapRecords = [];
    $this->migration = $this->getMigration();
    $this->message = $this->createMock('Drupal\\migrate\\MigrateMessageInterface');
    $this->eventDispatcher = $this->createMock('Symfony\\Contracts\\EventDispatcher\\EventDispatcherInterface');
    $this->executable = new TestMigrateExecutable($this->migration, $this->message, $this->eventDispatcher);
    $this->executable
        ->setStringTranslation($this->getStringTranslationStub());
}

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