function 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[[api-linebreak]] @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.