function EntityConverterTest::setUp

Same name and namespace in other branches
  1. 9 core/tests/Drupal/KernelTests/Core/ParamConverter/EntityConverterTest.php \Drupal\KernelTests\Core\ParamConverter\EntityConverterTest::setUp()
  2. 9 core/tests/Drupal/Tests/Core/ParamConverter/EntityConverterTest.php \Drupal\Tests\Core\ParamConverter\EntityConverterTest::setUp()
  3. 10 core/tests/Drupal/KernelTests/Core/ParamConverter/EntityConverterTest.php \Drupal\KernelTests\Core\ParamConverter\EntityConverterTest::setUp()
  4. 10 core/tests/Drupal/Tests/Core/ParamConverter/EntityConverterTest.php \Drupal\Tests\Core\ParamConverter\EntityConverterTest::setUp()
  5. 11.x core/tests/Drupal/KernelTests/Core/ParamConverter/EntityConverterTest.php \Drupal\KernelTests\Core\ParamConverter\EntityConverterTest::setUp()
  6. 11.x core/tests/Drupal/Tests/Core/ParamConverter/EntityConverterTest.php \Drupal\Tests\Core\ParamConverter\EntityConverterTest::setUp()

Overrides UnitTestCase::setUp

File

core/tests/Drupal/Tests/Core/ParamConverter/EntityConverterTest.php, line 56

Class

EntityConverterTest
@coversDefaultClass <a href="/api/drupal/core%21lib%21Drupal%21Core%21ParamConverter%21EntityConverter.php/class/EntityConverter/8.9.x" title="Parameter converter for upcasting entity IDs to full objects." class="local">\Drupal\Core\ParamConverter\EntityConverter</a> @group ParamConverter @group Entity

Namespace

Drupal\Tests\Core\ParamConverter

Code

protected function setUp() {
    parent::setUp();
    $this->entityTypeManager = $this->createMock(EntityTypeManagerInterface::class);
    $this->entityRepository = $this->createMock(EntityRepositoryInterface::class);
    $this->entityConverter = new EntityConverter($this->entityTypeManager, $this->entityRepository);
}

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