You are here

protected function StateTransitionValidationTest::setupQueryFactory in Workbench Moderation 8.2

Builds a mocked query factory that does nothing.

Return value

QueryFactory

3 calls to StateTransitionValidationTest::setupQueryFactory()
StateTransitionValidationTest::testIsTransitionAllowedWithInValidTransition in tests/src/Unit/StateTransitionValidationTest.php
@covers ::isTransitionAllowed @covers ::calculatePossibleTransitions
StateTransitionValidationTest::testIsTransitionAllowedWithValidTransition in tests/src/Unit/StateTransitionValidationTest.php
@covers ::isTransitionAllowed @covers ::calculatePossibleTransitions
StateTransitionValidationTest::testUserSensitiveValidTransitions in tests/src/Unit/StateTransitionValidationTest.php
Verifies user-aware transition validation.

File

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

Class

StateTransitionValidationTest
@coversDefaultClass \Drupal\workbench_moderation\StateTransitionValidation @group workbench_moderation

Namespace

Drupal\Tests\workbench_moderation\Unit

Code

protected function setupQueryFactory() {
  $factory = $this
    ->prophesize(QueryFactory::class);
  return $factory
    ->reveal();
}