a487d82ee1996cd0638ec5e031e0dc4127ad5b10
[yaffs-website] / web / core / modules / user / tests / src / Unit / Plugin / Action / RoleUserTestBase.php
1 <?php
2
3 namespace Drupal\Tests\user\Unit\Plugin\Action;
4
5 use Drupal\Tests\UnitTestCase;
6
7 /**
8  * Provides a base class for user role action tests.
9  */
10 abstract class RoleUserTestBase extends UnitTestCase {
11
12   /**
13    * The mocked account.
14    *
15    * @var \Drupal\user\UserInterface|\PHPUnit_Framework_MockObject_MockObject
16    */
17   protected $account;
18
19   /**
20    * The user role entity type.
21    *
22    * @var \Drupal\Core\Entity\EntityTypeInterface|\PHPUnit_Framework_MockObject_MockObject
23    */
24   protected $userRoleEntityType;
25
26   /**
27    * {@inheritdoc}
28    */
29   protected function setUp() {
30     parent::setUp();
31
32     $this->account = $this
33       ->getMockBuilder('Drupal\user\Entity\User')
34       ->disableOriginalConstructor()
35       ->getMock();
36     $this->userRoleEntityType = $this->getMock('Drupal\Core\Entity\EntityTypeInterface');
37   }
38
39 }