function EntityFormBuilderTest::setUp

Same name in other branches
  1. 9 core/tests/Drupal/Tests/Core/Entity/EntityFormBuilderTest.php \Drupal\Tests\Core\Entity\EntityFormBuilderTest::setUp()
  2. 8.9.x core/tests/Drupal/Tests/Core/Entity/EntityFormBuilderTest.php \Drupal\Tests\Core\Entity\EntityFormBuilderTest::setUp()
  3. 10 core/tests/Drupal/Tests/Core/Entity/EntityFormBuilderTest.php \Drupal\Tests\Core\Entity\EntityFormBuilderTest::setUp()

Overrides UnitTestCase::setUp

File

core/tests/Drupal/Tests/Core/Entity/EntityFormBuilderTest.php, line 40

Class

EntityFormBuilderTest
@coversDefaultClass \Drupal\Core\Entity\EntityFormBuilder @group Entity

Namespace

Drupal\Tests\Core\Entity

Code

protected function setUp() : void {
    parent::setUp();
    $this->formBuilder = $this->createMock('Drupal\\Core\\Form\\FormBuilderInterface');
    $this->entityTypeManager = $this->createMock('Drupal\\Core\\Entity\\EntityTypeManagerInterface');
    $this->entityFormBuilder = new EntityFormBuilder($this->entityTypeManager, $this->formBuilder);
}

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