You are here

protected function UserRegistrationResourceTest::setUp in Drupal 8

Same name and namespace in other branches
  1. 9 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() {
  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);
}