function EntityConverterTest::testDeprecatedLoadRevision

Tests that ::loadRevision() is deprecated.

@group legacy

@expectedDeprecation \Drupal\Core\ParamConverter\EntityConverter::loadRevision() is deprecated in Drupal 8.7.0 and will be removed before Drupal 9.0.0.

File

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

Class

EntityConverterTest
@coversDefaultClass \Drupal\Core\ParamConverter\EntityConverter @group ParamConverter @group Entity

Namespace

Drupal\Tests\Core\ParamConverter

Code

public function testDeprecatedLoadRevision() {
    $this->setUpMocks();
    $this->entityConverter = new EntityConverter($this->entityTypeManager, $this->entityRepository);
    $reflector = new \ReflectionMethod(EntityConverter::class, 'loadRevision');
    $reflector->setAccessible(TRUE);
    $revision = $this->createMock(ContentEntityInterface::class);
    $reflector->invoke($this->entityConverter, $revision, NULL);
}

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