Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / web / core / modules / rest / tests / src / Functional / EntityResource / Role / RoleResourceTestBase.php
index ee719c4b5696b258ece5e4a2f09cccb960dc1013..ea708e612d0138a923dbc0b9a7e0feaecfdfb9ae 100644 (file)
@@ -2,68 +2,15 @@
 
 namespace Drupal\Tests\rest\Functional\EntityResource\Role;
 
-use Drupal\Tests\rest\Functional\EntityResource\EntityResourceTestBase;
-use Drupal\user\Entity\Role;
+@trigger_error('The ' . __NAMESPACE__ . '\RoleResourceTestBase is deprecated in Drupal 8.6.x and will be removed before Drupal 9.0.0. Instead, use Drupal\Tests\user\Functional\Rest\RoleResourceTestBase. See https://www.drupal.org/node/2971931.', E_USER_DEPRECATED);
 
-abstract class RoleResourceTestBase extends EntityResourceTestBase {
-
-  /**
-   * {@inheritdoc}
-   */
-  public static $modules = ['user'];
-
-  /**
-   * {@inheritdoc}
-   */
-  protected static $entityTypeId = 'user_role';
-
-  /**
-   * @var \Drupal\user\RoleInterface
-   */
-  protected $entity;
-
-  /**
-   * {@inheritdoc}
-   */
-  protected function setUpAuthorization($method) {
-    $this->grantPermissionsToTestedRole(['administer permissions']);
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  protected function createEntity() {
-    $role = Role::create([
-      'id' => 'llama',
-      'name' => $this->randomString(),
-    ]);
-    $role->save();
-
-    return $role;
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  protected function getExpectedNormalizedEntity() {
-    return [
-      'uuid' => $this->entity->uuid(),
-      'weight' => 2,
-      'langcode' => 'en',
-      'status' => TRUE,
-      'dependencies' => [],
-      'id' => 'llama',
-      'label' => NULL,
-      'is_admin' => NULL,
-      'permissions' => [],
-    ];
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  protected function getNormalizedPostEntity() {
-    // @todo Update in https://www.drupal.org/node/2300677.
-  }
+use Drupal\Tests\user\Functional\Rest\RoleResourceTestBase as RoleResourceTestBaseReal;
 
+/**
+ * @deprecated in Drupal 8.6.x. Will be removed before Drupal 9.0.0. Use
+ *   Drupal\Tests\user\Functional\Rest\RoleResourceTestBase instead.
+ *
+ * @see https://www.drupal.org/node/2971931
+ */
+abstract class RoleResourceTestBase extends RoleResourceTestBaseReal {
 }