You are here

public function EntityFormTest::testSetEntityManager in Drupal 8

Tests that setEntityManager triggers proper deprecation errors.

@covers ::setEntityManager

@group legacy

@expectedDeprecation EntityForm::setEntityManager() is deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. Use EntityFormInterface::setEntityTypeManager() instead. See https://www.drupal.org/node/2549139

File

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

Class

EntityFormTest
@coversDefaultClass \Drupal\Core\Entity\EntityForm @group Entity

Namespace

Drupal\Tests\Core\Entity

Code

public function testSetEntityManager() {
  $this->entityForm
    ->setEntityManager($this
    ->prophesize(EntityManager::class)
    ->reveal());
}