diff --git a/core/modules/rest/tests/src/Unit/Plugin/Derivative/EntityDerivativeTest.php b/core/modules/rest/tests/src/Unit/Plugin/Derivative/EntityDerivativeTest.php index 08b2900..9f42db1 100644 --- a/core/modules/rest/tests/src/Unit/Plugin/Derivative/EntityDerivativeTest.php +++ b/core/modules/rest/tests/src/Unit/Plugin/Derivative/EntityDerivativeTest.php @@ -114,15 +114,21 @@ public function testGetDerivativeDefinitions() { // Default uris. $definition = $this->entityDerivative->getDerivativeDefinition('entity1', $base_plugin_definition); - $this->assertSame('bar', $definition['foo'], 'The base plugin definition was not properly merged.'); - $this->assertSame('entity:entity1', $definition['id'], 'The derivative ID was not properly set.'); - $this->assertSame('/entity/entity1/{entity1}', $definition['uri_paths']['canonical'], 'The default canonical uri was not properly set.'); + // Plugin definition merge. + $this->assertSame('bar', $definition['foo']); + // Derivative ID. + $this->assertSame('entity:entity1', $definition['id']); + // Canonical URI is set to default. + $this->assertSame('/entity/entity1/{entity1}', $definition['uri_paths']['canonical']); // Custom link template. $definition = $this->entityDerivative->getDerivativeDefinition('entity2', $base_plugin_definition); - $this->assertSame('bar', $definition['foo'], 'The base plugin definition was not properly merged.'); - $this->assertSame('entity:entity2', $definition['id'], 'The derivative ID was not properly set.'); - $this->assertSame('valid-router-path', $definition['uri_paths']['canonical'], 'The custom canonical uri was not properly set.'); + // Plugin definition merge. + $this->assertSame('bar', $definition['foo']); + // Derivative ID. + $this->assertSame('entity:entity2', $definition['id']); + // Custom canonical URI is set. + $this->assertSame('valid-router-path', $definition['uri_paths']['canonical']); $definitions = $this->entityDerivative->getDerivativeDefinitions($base_plugin_definition); $this->assertArrayHasKey('entity1', $definitions);