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 / FilterFormat / FilterFormatResourceTestBase.php
index 4d65e00f58708408bf8d7919bb15e07abaa5aa88..1ba0edcd0794a7b24f0f49ad7a7df53418ebdc7d 100644 (file)
@@ -2,87 +2,15 @@
 
 namespace Drupal\Tests\rest\Functional\EntityResource\FilterFormat;
 
-use Drupal\filter\Entity\FilterFormat;
-use Drupal\Tests\rest\Functional\EntityResource\EntityResourceTestBase;
+@trigger_error('The ' . __NAMESPACE__ . '\FilterFormatResourceTestBase is deprecated in Drupal 8.6.x and will be removed before Drupal 9.0.0. Instead, use Drupal\Tests\filter\Functional\Rest\FilterFormatResourceTestBase. See https://www.drupal.org/node/2971931.', E_USER_DEPRECATED);
 
-abstract class FilterFormatResourceTestBase extends EntityResourceTestBase {
-
-  /**
-   * {@inheritdoc}
-   */
-  public static $modules = [];
-
-  /**
-   * {@inheritdoc}
-   */
-  protected static $entityTypeId = 'filter_format';
-
-  /**
-   * @var \Drupal\filter\FilterFormatInterface
-   */
-  protected $entity;
-
-  /**
-   * {@inheritdoc}
-   */
-  protected function setUpAuthorization($method) {
-    $this->grantPermissionsToTestedRole(['administer filters']);
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  protected function createEntity() {
-    $pablo_format = FilterFormat::create([
-      'name' => 'Pablo Piccasso',
-      'format' => 'pablo',
-      'langcode' => 'es',
-      'filters' => [
-        'filter_html' => [
-          'status' => TRUE,
-          'settings' => [
-            'allowed_html' => '<p> <a> <b> <lo>',
-          ],
-        ],
-      ],
-    ]);
-    $pablo_format->save();
-    return $pablo_format;
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  protected function getExpectedNormalizedEntity() {
-    return [
-      'dependencies' => [],
-      'filters' => [
-        'filter_html' => [
-          'id' => 'filter_html',
-          'provider' => 'filter',
-          'status' => TRUE,
-          'weight' => -10,
-          'settings' => [
-            'allowed_html' => '<p> <a> <b> <lo>',
-            'filter_html_help' => TRUE,
-            'filter_html_nofollow' => FALSE,
-          ],
-        ],
-      ],
-      'format' => 'pablo',
-      'langcode' => 'es',
-      'name' => 'Pablo Piccasso',
-      'status' => TRUE,
-      'uuid' => $this->entity->uuid(),
-      'weight' => 0,
-    ];
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  protected function getNormalizedPostEntity() {
-    // @todo Update in https://www.drupal.org/node/2300677.
-  }
+use Drupal\Tests\filter\Functional\Rest\FilterFormatResourceTestBase as FilterFormatResourceTestBaseReal;
 
+/**
+ * @deprecated in Drupal 8.6.x. Will be removed before Drupal 9.0.0. Use
+ *   Drupal\Tests\filter\Functional\Rest\FilterFormatResourceTestBase instead.
+ *
+ * @see https://www.drupal.org/node/2971931
+ */
+abstract class FilterFormatResourceTestBase extends FilterFormatResourceTestBaseReal {
 }