You are here

protected function UserRegistrationResourceTest::setUp in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/user/tests/src/Unit/UserRegistrationResourceTest.php \Drupal\Tests\user\Unit\UserRegistrationResourceTest::setUp()

Overrides UnitTestCase::setUp

File

core/modules/user/tests/src/Unit/UserRegistrationResourceTest.php, line 63

Class

UserRegistrationResourceTest
Tests User Registration REST resource.

Namespace

Drupal\Tests\user\Unit

Code

protected function setUp() : void {
  parent::setUp();
  $this->logger = $this
    ->prophesize(LoggerInterface::class)
    ->reveal();
  $this->userSettings = $this
    ->prophesize(ImmutableConfig::class);
  $this->currentUser = $this
    ->prophesize(AccountInterface::class);
  $this->testClass = new UserRegistrationResource([], 'plugin_id', '', [], $this->logger, $this->userSettings
    ->reveal(), $this->currentUser
    ->reveal());
  $this->reflection = new \ReflectionClass($this->testClass);
}