From cff3a5b372ff3575c762099ba8001c3626a91080 Mon Sep 17 00:00:00 2001 From: Pieter Frenssen Date: Mon, 14 Jun 2021 18:53:40 +0300 Subject: [PATCH] ISAICP-6467: Entity type aliases are intended to be human readable. --- tests/src/Traits/EntityTrait.php | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/tests/src/Traits/EntityTrait.php b/tests/src/Traits/EntityTrait.php index 4785b01805..694e7296df 100644 --- a/tests/src/Traits/EntityTrait.php +++ b/tests/src/Traits/EntityTrait.php @@ -75,22 +75,22 @@ protected static function getEntityByLabel(string $entity_type_id, string $label */ protected static function entityTypeAliases(): array { return [ - 'asset_distribution' => 'rdf_entity', - 'asset_release' => 'rdf_entity', - 'contact_information' => 'rdf_entity', 'collection' => 'rdf_entity', + 'contact information' => 'rdf_entity', 'content' => 'node', - 'custom_page' => 'node', + 'custom page' => 'node', 'discussion' => 'node', + 'distribution' => 'rdf_entity', 'document' => 'node', 'event' => 'node', 'glossary' => 'node', 'group' => 'rdf_entity', 'news' => 'node', 'owner' => 'rdf_entity', + 'release' => 'rdf_entity', 'solution' => 'rdf_entity', - 'spdx_licence' => 'rdf_entity', - 'tallinn_report' => 'node', + 'spdx licence' => 'rdf_entity', + 'tallinn report' => 'node', ]; } @@ -138,13 +138,13 @@ protected static function translateBundle(string $bundle): string { */ protected static function bundleAliases(): array { return [ - 'news' => 'news', 'custom page' => 'custom_page', - 'event' => 'event', 'discussion' => 'discussion', - 'document' => 'document', 'distribution' => 'asset_distribution', + 'document' => 'document', + 'event' => 'event', 'glossary' => 'glossary', + 'news' => 'news', 'release' => 'asset_release', 'spdx licence' => 'spdx_licence', 'tallinn report' => 'tallinn_report', @@ -223,9 +223,9 @@ public function visitEntityForm(string $action, string $title, string $bundle): throw new \InvalidArgumentException('Only "edit" and "delete" actions are allowed.'); } - $bundle = $this->translateBundle($bundle); $entity_type_id = $this->translateEntityTypeAlias($bundle); + $bundle = $this->translateBundle($bundle); $node = $this->getEntityByLabel($entity_type_id, $title, $bundle); $path = $node->toUrl("{$action}-form")->getInternalPath(); $this->visitPath($path);