You are here

protected function ModerationInformationTest::getUser in Workbench Moderation 8

Same name and namespace in other branches
  1. 8.2 tests/src/Unit/ModerationInformationTest.php \Drupal\Tests\workbench_moderation\Unit\ModerationInformationTest::getUser()

Builds a mock user.

Return value

\Drupal\Core\Session\AccountInterface Returns account interface.

5 calls to ModerationInformationTest::getUser()
ModerationInformationTest::testIsModeratableBundle in tests/src/Unit/ModerationInformationTest.php
Test moderatable bundle.
ModerationInformationTest::testIsModeratableEntity in tests/src/Unit/ModerationInformationTest.php
Test moderatable entity.
ModerationInformationTest::testIsModeratableEntityForNonBundleEntityType in tests/src/Unit/ModerationInformationTest.php
@covers ::isModeratableEntity
ModerationInformationTest::testIsModeratedEntityForm in tests/src/Unit/ModerationInformationTest.php
Test moderated entity form.
ModerationInformationTest::testIsModeratedEntityFormWithNonContentEntityForm in tests/src/Unit/ModerationInformationTest.php
Test if moderated entity form is with non content entity form.

File

tests/src/Unit/ModerationInformationTest.php, line 28

Class

ModerationInformationTest
@coversDefaultClass \Drupal\workbench_moderation\ModerationInformation @group workbench_moderation

Namespace

Drupal\Tests\workbench_moderation\Unit

Code

protected function getUser() {
  return $this
    ->prophesize(AccountInterface::class)
    ->reveal();
}