function EntityFormTest::setUp

Same name in this branch
  1. 8.9.x core/modules/system/tests/src/Functional/Entity/EntityFormTest.php \Drupal\Tests\system\Functional\Entity\EntityFormTest::setUp()
Same name and namespace in other branches
  1. 9 core/modules/system/tests/src/Functional/Entity/EntityFormTest.php \Drupal\Tests\system\Functional\Entity\EntityFormTest::setUp()
  2. 9 core/tests/Drupal/Tests/Core/Entity/EntityFormTest.php \Drupal\Tests\Core\Entity\EntityFormTest::setUp()
  3. 10 core/modules/system/tests/src/Functional/Entity/EntityFormTest.php \Drupal\Tests\system\Functional\Entity\EntityFormTest::setUp()
  4. 10 core/tests/Drupal/Tests/Core/Entity/EntityFormTest.php \Drupal\Tests\Core\Entity\EntityFormTest::setUp()
  5. 11.x core/modules/system/tests/src/Functional/Entity/EntityFormTest.php \Drupal\Tests\system\Functional\Entity\EntityFormTest::setUp()
  6. 11.x core/tests/Drupal/Tests/Core/Entity/EntityFormTest.php \Drupal\Tests\Core\Entity\EntityFormTest::setUp()

Overrides UnitTestCase::setUp

File

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

Class

EntityFormTest
@coversDefaultClass <a href="/api/drupal/core%21lib%21Drupal%21Core%21Entity%21EntityForm.php/class/EntityForm/8.9.x" title="Base class for entity forms." class="local">\Drupal\Core\Entity\EntityForm</a> @group Entity

Namespace

Drupal\Tests\Core\Entity

Code

protected function setUp() {
    parent::setUp();
    $this->entityForm = new EntityForm();
    $this->entityType = new EntityType([
        'id' => 'entity_test',
    ]);
}

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