namespace Drupal\Tests\rest\Functional\EntityResource\NodeType;
-use Drupal\node\Entity\NodeType;
-use Drupal\Tests\rest\Functional\EntityResource\EntityResourceTestBase;
+@trigger_error('The ' . __NAMESPACE__ . '\NodeTypeResourceTestBase is deprecated in Drupal 8.6.x and will be removed before Drupal 9.0.0. Instead, use Drupal\Tests\node\Functional\Rest\NodeTypeResourceTestBase. See https://www.drupal.org/node/2971931.', E_USER_DEPRECATED);
+
+use Drupal\Tests\node\Functional\Rest\NodeTypeResourceTestBase as NodeTypeResourceTestBaseReal;
/**
- * ResourceTestBase for NodeType entity.
+ * @deprecated in Drupal 8.6.x. Will be removed before Drupal 9.0.0. Use
+ * Drupal\Tests\node\Functional\Rest\NodeTypeResourceTestBase instead.
+ *
+ * @see https://www.drupal.org/node/2971931
*/
-abstract class NodeTypeResourceTestBase extends EntityResourceTestBase {
-
- /**
- * {@inheritdoc}
- */
- public static $modules = ['node'];
-
- /**
- * {@inheritdoc}
- */
- protected static $entityTypeId = 'node_type';
-
- /**
- * The NodeType entity.
- *
- * @var \Drupal\node\NodeTypeInterface
- */
- protected $entity;
-
- /**
- * {@inheritdoc}
- */
- protected function setUpAuthorization($method) {
- $this->grantPermissionsToTestedRole(['administer content types', 'access content']);
- }
-
- /**
- * {@inheritdoc}
- */
- protected function createEntity() {
- // Create a "Camelids" node type.
- $camelids = NodeType::create([
- 'name' => 'Camelids',
- 'type' => 'camelids',
- 'description' => 'Camelids are large, strictly herbivorous animals with slender necks and long legs.',
- ]);
-
- $camelids->save();
-
- return $camelids;
- }
-
- /**
- * {@inheritdoc}
- */
- protected function getExpectedNormalizedEntity() {
- return [
- 'dependencies' => [],
- 'description' => 'Camelids are large, strictly herbivorous animals with slender necks and long legs.',
- 'display_submitted' => TRUE,
- 'help' => NULL,
- 'langcode' => 'en',
- 'name' => 'Camelids',
- 'new_revision' => TRUE,
- 'preview_mode' => 1,
- 'status' => TRUE,
- 'type' => 'camelids',
- 'uuid' => $this->entity->uuid(),
- ];
- }
-
- /**
- * {@inheritdoc}
- */
- protected function getNormalizedPostEntity() {
- // @todo Update in https://www.drupal.org/node/2300677.
- }
-
- /**
- * {@inheritdoc}
- */
- protected function getExpectedUnauthorizedAccessMessage($method) {
- if ($this->config('rest.settings')->get('bc_entity_resource_permissions')) {
- return parent::getExpectedUnauthorizedAccessMessage($method);
- }
-
- return "The 'access content' permission is required.";
- }
-
+abstract class NodeTypeResourceTestBase extends NodeTypeResourceTestBaseReal {
}