class RoleUserTestBase
Same name and namespace in other branches
- 11.x core/modules/user/tests/src/Unit/Plugin/Action/RoleUserTestBase.php \Drupal\Tests\user\Unit\Plugin\Action\RoleUserTestBase
- 10 core/modules/user/tests/src/Unit/Plugin/Action/RoleUserTestBase.php \Drupal\Tests\user\Unit\Plugin\Action\RoleUserTestBase
- 8.9.x core/modules/user/tests/src/Unit/Plugin/Action/RoleUserTestBase.php \Drupal\Tests\user\Unit\Plugin\Action\RoleUserTestBase
Provides a base class for user role action tests.
Hierarchy
- class \Drupal\Tests\UnitTestCase uses \Drupal\Tests\Traits\PhpUnitWarnings, \Drupal\Tests\PhpUnitCompatibilityTrait, \Symfony\Bridge\PhpUnit\ExpectDeprecationTrait extends \PHPUnit\Framework\TestCase
- class \Drupal\Tests\user\Unit\Plugin\Action\RoleUserTestBase extends \Drupal\Tests\UnitTestCase
Expanded class hierarchy of RoleUserTestBase
File
-
core/
modules/ user/ tests/ src/ Unit/ Plugin/ Action/ RoleUserTestBase.php, line 10
Namespace
Drupal\Tests\user\Unit\Plugin\ActionView source
abstract class RoleUserTestBase extends UnitTestCase {
/**
* The mocked account.
*
* @var \Drupal\user\UserInterface|\PHPUnit\Framework\MockObject\MockObject
*/
protected $account;
/**
* The user role entity type.
*
* @var \Drupal\Core\Entity\EntityTypeInterface|\PHPUnit\Framework\MockObject\MockObject
*/
protected $userRoleEntityType;
/**
* {@inheritdoc}
*/
protected function setUp() {
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.