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 / DateFormat / DateFormatResourceTestBase.php
index 8fce0fed15eccfcea2c6e3753888a6bfa5bd6e80..1c0522a21b735eb3a1f28b712852c3ffc6ec16f3 100644 (file)
@@ -2,75 +2,15 @@
 
 namespace Drupal\Tests\rest\Functional\EntityResource\DateFormat;
 
-use Drupal\Core\Datetime\Entity\DateFormat;
-use Drupal\Tests\rest\Functional\EntityResource\EntityResourceTestBase;
+@trigger_error('The ' . __NAMESPACE__ . '\DateFormatResourceTestBase is deprecated in Drupal 8.6.x and will be removed before Drupal 9.0.0. Instead, use Drupal\FunctionalTests\Rest\DateFormatResourceTestBase. See https://www.drupal.org/node/2971931.', E_USER_DEPRECATED);
+
+use Drupal\FunctionalTests\Rest\DateFormatResourceTestBase as DateFormatResourceTestBaseReal;
 
 /**
- * ResourceTestBase for DateFormat entity.
+ * @deprecated in Drupal 8.6.x. Will be removed before Drupal 9.0.0. Use
+ *   Drupal\FunctionalTests\Rest\DateFormatResourceTestBase instead.
+ *
+ * @see https://www.drupal.org/node/2971931
  */
-abstract class DateFormatResourceTestBase extends EntityResourceTestBase {
-
-  /**
-   * {@inheritdoc}
-   */
-  public static $modules = [];
-
-  /**
-   * {@inheritdoc}
-   */
-  protected static $entityTypeId = 'date_format';
-
-  /**
-   * The DateFormat entity.
-   *
-   * @var \Drupal\Core\Datetime\DateFormatInterface
-   */
-  protected $entity;
-
-  /**
-   * {@inheritdoc}
-   */
-  protected function setUpAuthorization($method) {
-    $this->grantPermissionsToTestedRole(['administer site configuration']);
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  protected function createEntity() {
-    // Create a date format.
-    $date_format = DateFormat::create([
-      'id' => 'llama',
-      'label' => 'Llama',
-      'pattern' => 'F d, Y',
-    ]);
-
-    $date_format->save();
-
-    return $date_format;
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  protected function getExpectedNormalizedEntity() {
-    return [
-      'dependencies' => [],
-      'id' => 'llama',
-      'label' => 'Llama',
-      'langcode' => 'en',
-      'locked' => FALSE,
-      'pattern' => 'F d, Y',
-      'status' => TRUE,
-      'uuid' => $this->entity->uuid(),
-    ];
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  protected function getNormalizedPostEntity() {
-    // @todo Update in https://www.drupal.org/node/2300677.
-  }
-
+abstract class DateFormatResourceTestBase extends DateFormatResourceTestBaseReal {
 }