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 / RestResourceConfig / RestResourceConfigResourceTestBase.php
index a19e2ef93f89b6a62008c08b61d2dd2a2fa6e1f5..188386fd1f8539b3ae9f1b1724868ec33d42f08a 100644 (file)
 
 namespace Drupal\Tests\rest\Functional\EntityResource\RestResourceConfig;
 
-use Drupal\Tests\rest\Functional\EntityResource\EntityResourceTestBase;
-use Drupal\rest\Entity\RestResourceConfig;
+@trigger_error('The ' . __NAMESPACE__ . '\RestResourceConfigResourceTestBase is deprecated in Drupal 8.6.x and will be removed before Drupal 9.0.0. Instead, use Drupal\Tests\rest\Functional\Rest\RestResourceConfigResourceTestBase. See https://www.drupal.org/node/2971931.', E_USER_DEPRECATED);
 
-abstract class RestResourceConfigResourceTestBase extends EntityResourceTestBase {
-
-  /**
-   * {@inheritdoc}
-   */
-  public static $modules = ['dblog'];
-
-  /**
-   * {@inheritdoc}
-   */
-  protected static $entityTypeId = 'rest_resource_config';
-
-  /**
-   * @var \Drupal\rest\RestResourceConfigInterface
-   */
-  protected $entity;
-
-  /**
-   * {@inheritdoc}
-   */
-  protected function setUpAuthorization($method) {
-    $this->grantPermissionsToTestedRole(['administer rest resources']);
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  protected function createEntity() {
-    $rest_resource_config = RestResourceConfig::create([
-      'id' => 'llama',
-      'plugin_id' => 'dblog',
-      'granularity' => 'method',
-      'configuration' => [
-        'GET' => [
-          'supported_formats' => [
-            'json',
-          ],
-          'supported_auth' => [
-            'cookie',
-          ],
-        ],
-      ],
-    ]);
-    $rest_resource_config->save();
-
-    return $rest_resource_config;
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  protected function getExpectedNormalizedEntity() {
-    return [
-      'uuid' => $this->entity->uuid(),
-      'langcode' => 'en',
-      'status' => TRUE,
-      'dependencies' => [
-        'module' => [
-          'dblog',
-          'serialization',
-          'user',
-        ],
-      ],
-      'id' => 'llama',
-      'plugin_id' => 'dblog',
-      'granularity' => 'method',
-      'configuration' => [
-        'GET' => [
-          'supported_formats' => [
-            'json',
-          ],
-          'supported_auth' => [
-            'cookie',
-          ],
-        ],
-      ],
-    ];
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  protected function getNormalizedPostEntity() {
-    // @todo Update in https://www.drupal.org/node/2300677.
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  protected function getExpectedCacheContexts() {
-    return [
-      'user.permissions',
-    ];
-  }
+use Drupal\Tests\rest\Functional\Rest\RestResourceConfigResourceTestBase as RestResourceConfigResourceTestBaseReal;
 
+/**
+ * @deprecated in Drupal 8.6.x. Will be removed before Drupal 9.0.0. Use
+ *   Drupal\Tests\rest\Functional\Rest\RestResourceConfigResourceTestBase instead.
+ *
+ * @see https://www.drupal.org/node/2971931
+ */
+abstract class RestResourceConfigResourceTestBase extends RestResourceConfigResourceTestBaseReal {
 }