Version 1
[yaffs-website] / web / core / modules / user / tests / src / Unit / Plugin / Action / RoleUserTestBase.php
diff --git a/web/core/modules/user/tests/src/Unit/Plugin/Action/RoleUserTestBase.php b/web/core/modules/user/tests/src/Unit/Plugin/Action/RoleUserTestBase.php
new file mode 100644 (file)
index 0000000..a487d82
--- /dev/null
@@ -0,0 +1,39 @@
+<?php
+
+namespace Drupal\Tests\user\Unit\Plugin\Action;
+
+use Drupal\Tests\UnitTestCase;
+
+/**
+ * Provides a base class for user role action tests.
+ */
+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->getMock('Drupal\Core\Entity\EntityTypeInterface');
+  }
+
+}