function StateTransitionValidationTest::testDeprecatedEntityParameter

@expectedDeprecation Omitting the $entity parameter from Drupal\content_moderation\StateTransitionValidation::isTransitionValid is deprecated and will be required in Drupal 9.0.0. @group legacy

File

core/modules/content_moderation/tests/src/Unit/StateTransitionValidationTest.php, line 101

Class

StateTransitionValidationTest
@coversDefaultClass \Drupal\content_moderation\StateTransitionValidation @group content_moderation

Namespace

Drupal\Tests\content_moderation\Unit

Code

public function testDeprecatedEntityParameter() {
    $moderation_info = $this->prophesize(ModerationInformationInterface::class);
    $state = new State($this->workflow
        ->getTypePlugin(), 'draft', 'draft');
    $user = $this->prophesize(AccountInterface::class);
    $validator = new StateTransitionValidation($moderation_info->reveal());
    $validator->isTransitionValid($this->workflow, $state, $state, $user->reveal());
}

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