function ModerationInformationTest::getUser

Same name in other branches
  1. 9 core/modules/content_moderation/tests/src/Unit/ModerationInformationTest.php \Drupal\Tests\content_moderation\Unit\ModerationInformationTest::getUser()
  2. 8.9.x core/modules/content_moderation/tests/src/Unit/ModerationInformationTest.php \Drupal\Tests\content_moderation\Unit\ModerationInformationTest::getUser()
  3. 11.x core/modules/content_moderation/tests/src/Unit/ModerationInformationTest.php \Drupal\Tests\content_moderation\Unit\ModerationInformationTest::getUser()

Builds a mock user.

Return value

\Drupal\Core\Session\AccountInterface The mocked user.

File

core/modules/content_moderation/tests/src/Unit/ModerationInformationTest.php, line 32

Class

ModerationInformationTest
@coversDefaultClass \Drupal\content_moderation\ModerationInformation @group content_moderation

Namespace

Drupal\Tests\content_moderation\Unit

Code

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

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.