.../tests/src/Functional/EntityResource/EntityResourceTestBase.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php b/core/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php index 2f7864c..257c580 100644 --- a/core/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php +++ b/core/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php @@ -161,7 +161,10 @@ * Provisions a single-format entity REST resource. Defaults to FALSE. */ protected function provisionEntityResource($single_format = FALSE) { - $this->resourceConfigStorage->delete($this->resourceConfigStorage->loadMultiple()); + if ($existing = $this->resourceConfigStorage->load(static::$resourceConfigId)) { + $existing->delete(); + } + $format = $single_format ? [static::$format] : [static::$format, 'foobar'];