function EntityUnitTest::setUp

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

Overrides UnitTestCase::setUp

File

core/tests/Drupal/Tests/Core/Entity/EntityUnitTest.php, line 89

Class

EntityUnitTest
Tests Drupal\Core\Entity\EntityBase.

Namespace

Drupal\Tests\Core\Entity

Code

protected function setUp() : void {
  parent::setUp();
  $this->values = [
    'id' => 1,
    'langcode' => 'en',
    'uuid' => '3bb9ee60-bea5-4622-b89b-a63319d10b3a',
  ];
  $this->entityTypeId = $this->randomMachineName();
}

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