function RoleUserTestBase::setUp

Same name in other branches
  1. 9 core/modules/user/tests/src/Unit/Plugin/Action/RoleUserTestBase.php \Drupal\Tests\user\Unit\Plugin\Action\RoleUserTestBase::setUp()
  2. 8.9.x core/modules/user/tests/src/Unit/Plugin/Action/RoleUserTestBase.php \Drupal\Tests\user\Unit\Plugin\Action\RoleUserTestBase::setUp()
  3. 10 core/modules/user/tests/src/Unit/Plugin/Action/RoleUserTestBase.php \Drupal\Tests\user\Unit\Plugin\Action\RoleUserTestBase::setUp()

Overrides UnitTestCase::setUp

File

core/modules/user/tests/src/Unit/Plugin/Action/RoleUserTestBase.php, line 31

Class

RoleUserTestBase
Provides a base class for user role action tests.

Namespace

Drupal\Tests\user\Unit\Plugin\Action

Code

protected function setUp() : void {
    parent::setUp();
    $this->account = $this->getMockBuilder('Drupal\\user\\Entity\\User')
        ->disableOriginalConstructor()
        ->getMock();
    $this->userRoleEntityType = $this->createMock('Drupal\\Core\\Entity\\EntityTypeInterface');
}

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