You are here

protected function Validator::getTransitionFromStates in Workbench Moderation 8.2

Same name and namespace in other branches
  1. 8 tests/src/Unit/StateTransitionValidationTest.php \Drupal\Tests\workbench_moderation\Unit\Validator::getTransitionFromStates()

@inheritDoc

Overrides StateTransitionValidation::getTransitionFromStates

File

tests/src/Unit/StateTransitionValidationTest.php, line 246

Class

Validator
Testable subclass for selected tests.

Namespace

Drupal\Tests\workbench_moderation\Unit

Code

protected function getTransitionFromStates($from, $to) {
  if ($from == 'draft' && $to == 'draft') {
    return $this
      ->transitionStorage()
      ->loadMultiple([
      'draft__draft',
    ])[0];
  }
}