X-Git-Url: http://www.aleph1.co.uk/gitweb/?a=blobdiff_plain;ds=sidebyside;f=web%2Fcore%2Fmodules%2Frest%2Ftests%2Fsrc%2FFunctional%2FEntityResource%2FConfigTest%2FConfigTestResourceTestBase.php;fp=web%2Fcore%2Fmodules%2Frest%2Ftests%2Fsrc%2FFunctional%2FEntityResource%2FConfigTest%2FConfigTestResourceTestBase.php;h=87ca8b64577ff4af029c711096b700d241772376;hb=0bf8d09d2542548982e81a441b1f16e75873a04f;hp=9fe073b097b00c0e8340a88015c9737a7824e501;hpb=74df008bdbb3a11eeea356744f39b802369bda3c;p=yaffs-website diff --git a/web/core/modules/rest/tests/src/Functional/EntityResource/ConfigTest/ConfigTestResourceTestBase.php b/web/core/modules/rest/tests/src/Functional/EntityResource/ConfigTest/ConfigTestResourceTestBase.php index 9fe073b09..87ca8b645 100644 --- a/web/core/modules/rest/tests/src/Functional/EntityResource/ConfigTest/ConfigTestResourceTestBase.php +++ b/web/core/modules/rest/tests/src/Functional/EntityResource/ConfigTest/ConfigTestResourceTestBase.php @@ -2,72 +2,15 @@ namespace Drupal\Tests\rest\Functional\EntityResource\ConfigTest; -use Drupal\config_test\Entity\ConfigTest; -use Drupal\Tests\rest\Functional\EntityResource\EntityResourceTestBase; +@trigger_error('The ' . __NAMESPACE__ . '\ConfigTestResourceTestBase is deprecated in Drupal 8.6.x and will be removed before Drupal 9.0.0. Instead, use Drupal\Tests\config_test\Functional\Rest\ConfigTestResourceTestBase. See https://www.drupal.org/node/2971931.', E_USER_DEPRECATED); -abstract class ConfigTestResourceTestBase extends EntityResourceTestBase { - - /** - * {@inheritdoc} - */ - public static $modules = ['config_test', 'config_test_rest']; - - /** - * {@inheritdoc} - */ - protected static $entityTypeId = 'config_test'; - - /** - * @var \Drupal\config_test\ConfigTestInterface - */ - protected $entity; - - /** - * {@inheritdoc} - */ - protected function setUpAuthorization($method) { - $this->grantPermissionsToTestedRole(['view config_test']); - } - - /** - * {@inheritdoc} - */ - protected function createEntity() { - $config_test = ConfigTest::create([ - 'id' => 'llama', - 'label' => 'Llama', - ]); - $config_test->save(); - - return $config_test; - } - - /** - * {@inheritdoc} - */ - protected function getExpectedNormalizedEntity() { - $normalization = [ - 'uuid' => $this->entity->uuid(), - 'id' => 'llama', - 'weight' => 0, - 'langcode' => 'en', - 'status' => TRUE, - 'dependencies' => [], - 'label' => 'Llama', - 'style' => NULL, - 'size' => NULL, - 'size_value' => NULL, - 'protected_property' => NULL, - ]; - - return $normalization; - } - - /** - * {@inheritdoc} - */ - protected function getNormalizedPostEntity() { - // @todo Update in https://www.drupal.org/node/2300677. - } +use Drupal\Tests\config_test\Functional\Rest\ConfigTestResourceTestBase as ConfigTestResourceTestBaseReal; +/** + * @deprecated in Drupal 8.6.x. Will be removed before Drupal 9.0.0. Use + * Drupal\Tests\config_test\Functional\Rest\ConfigTestResourceTestBase instead. + * + * @see https://www.drupal.org/node/2971931 + */ +abstract class ConfigTestResourceTestBase extends ConfigTestResourceTestBaseReal { }