diff -u b/src/Tests/ModerationStateTransitionsValidationTest.php b/src/Tests/ModerationStateTransitionsValidationTest.php --- b/src/Tests/ModerationStateTransitionsValidationTest.php +++ b/src/Tests/ModerationStateTransitionsValidationTest.php @@ -2,6 +2,9 @@ namespace Drupal\workbench_moderation\Tests; +use Drupal\entity_test\Entity\EntityTestBundle; +use Drupal\system\Tests\Entity; + /** * Tests if state transitions are valid. * @@ -24,6 +27,16 @@ protected $webUser; /** + * Modules to enable. + * + * @var array + */ + public static $modules = [ + 'entity_test', + 'workbench_moderation', + ]; + + /** * {@inheritdoc} */ protected function setUp() { @@ -62,7 +75,7 @@ 'status' => 0, 'moderation_state' => 'draft', ]); - // After granting permissisons webUser should have create access. + // After granting permissions webUser should have create access. $this->assertEqual( TRUE, $this->accessHandler->createAccess($node->bundle(), $this->webUser2, [ @@ -80,7 +93,7 @@ ]), 'Node create Access is Forbidden'); - // Preventing access when no tansiton state defined. + // Preventing access when no transition state defined. $this->drupalLogout(); $this->drupalLogin($this->webUser2); @@ -105,6 +118,7 @@ $this->accessHandler->access($node1, 'update', $this->webUser2), 'Node edit Access is Forbidden'); + // Non-Node test. $entity_type = \Drupal::entityManager()->getDefinition('entity_test_bundle');