public function StateTransitionValidationTest::testIsTransitionAllowedWithInValidTransition in Workbench Moderation 8
Same name and namespace in other branches
- 8.2 tests/src/Unit/StateTransitionValidationTest.php \Drupal\Tests\workbench_moderation\Unit\StateTransitionValidationTest::testIsTransitionAllowedWithInValidTransition()
@covers ::isTransitionAllowed @covers ::calculatePossibleTransitions
File
- tests/
src/ Unit/ StateTransitionValidationTest.php, line 166
Class
- StateTransitionValidationTest
- @coversDefaultClass \Drupal\workbench_moderation\StateTransitionValidation @group workbench_moderation
Namespace
Drupal\Tests\workbench_moderation\UnitCode
public function testIsTransitionAllowedWithInValidTransition() {
$state_transition_validation = new StateTransitionValidation($this
->setupEntityTypeManager());
$this
->assertFalse($state_transition_validation
->isTransitionAllowed('published', 'needs_review'));
$this
->assertFalse($state_transition_validation
->isTransitionAllowed('published', 'staging'));
$this
->assertFalse($state_transition_validation
->isTransitionAllowed('staging', 'needs_review'));
$this
->assertFalse($state_transition_validation
->isTransitionAllowed('staging', 'staging'));
$this
->assertFalse($state_transition_validation
->isTransitionAllowed('needs_review', 'published'));
$this
->assertFalse($state_transition_validation
->isTransitionAllowed('published', 'archived'));
$this
->assertFalse($state_transition_validation
->isTransitionAllowed('archived', 'published'));
}