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 / EntityViewMode / EntityViewModeResourceTestBase.php
index 28cb9b0303528071c5f5080d7ff43bdbd39e3efb..bdbd58bfab4760246bef4ea8c78aff1be415705a 100644 (file)
@@ -2,73 +2,15 @@
 
 namespace Drupal\Tests\rest\Functional\EntityResource\EntityViewMode;
 
-use Drupal\Tests\rest\Functional\EntityResource\EntityResourceTestBase;
-use Drupal\Core\Entity\Entity\EntityViewMode;
+@trigger_error('The ' . __NAMESPACE__ . '\EntityViewModeResourceTestBase is deprecated in Drupal 8.6.x and will be removed before Drupal 9.0.0. Instead, use Drupal\FunctionalTests\Rest\EntityViewModeResourceTestBase. See https://www.drupal.org/node/2971931.', E_USER_DEPRECATED);
 
-abstract class EntityViewModeResourceTestBase extends EntityResourceTestBase {
-
-  /**
-   * {@inheritdoc}
-   *
-   * @todo: Remove 'field_ui' when https://www.drupal.org/node/2867266.
-   */
-  public static $modules = ['user', 'field_ui'];
-
-  /**
-   * {@inheritdoc}
-   */
-  protected static $entityTypeId = 'entity_view_mode';
-
-  /**
-   * @var \Drupal\Core\Entity\EntityViewModeInterface
-   */
-  protected $entity;
-
-  /**
-   * {@inheritdoc}
-   */
-  protected function setUpAuthorization($method) {
-    $this->grantPermissionsToTestedRole(['administer display modes']);
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  protected function createEntity() {
-    $entity_view_mode = EntityViewMode::create([
-      'id' => 'user.test',
-      'label' => 'Test',
-      'targetEntityType' => 'user',
-    ]);
-    $entity_view_mode->save();
-    return $entity_view_mode;
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  protected function getExpectedNormalizedEntity() {
-    return [
-      'cache' => TRUE,
-      'dependencies' => [
-        'module' => [
-          'user',
-        ],
-      ],
-      'id' => 'user.test',
-      'label' => 'Test',
-      'langcode' => 'en',
-      'status' => TRUE,
-      'targetEntityType' => 'user',
-      'uuid' => $this->entity->uuid(),
-    ];
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  protected function getNormalizedPostEntity() {
-    // @todo Update in https://www.drupal.org/node/2300677.
-  }
+use Drupal\FunctionalTests\Rest\EntityViewModeResourceTestBase as EntityViewModeResourceTestBaseReal;
 
+/**
+ * @deprecated in Drupal 8.6.x. Will be removed before Drupal 9.0.0. Use
+ *   Drupal\FunctionalTests\Rest\EntityViewModeResourceTestBase instead.
+ *
+ * @see https://www.drupal.org/node/2971931
+ */
+abstract class EntityViewModeResourceTestBase extends EntityViewModeResourceTestBaseReal {
 }