Part of #2285413: [Meta] Standardize entity route names. See there for details.

entity_test module has a number of entities that are subclasses of entity_test, and sometimes reuse its links and sometimes not. I don't fully grok what's going on there so this is a bit harder to convert.

I am assigning to fago for help on what to do with those. :-) fago, please advise.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dawehner’s picture

Some of them also points to routes which do not exist. I think we should in general standardize the available links.

Temoor’s picture

Status: Active » Needs review
FileSize
7.47 KB

Updated route names, however not sure what should be done with unused items, so they are renamed too.

Status: Needs review » Needs work

The last submitted patch, 2: drupal8.entity-system-2314889-2.patch, failed testing.

andypost’s picture

Status: Needs work » Needs review
FileSize
6.46 KB
10.11 KB

Fix other routes

Status: Needs review » Needs work

The last submitted patch, 4: 2314889-4.patch, failed testing.

andypost’s picture

Status: Needs work » Needs review
FileSize
2.39 KB
11.97 KB

Found a bug in comment tests, also fixed missed redirect in add form

Status: Needs review » Needs work

The last submitted patch, 6: 2314889-entity_test-routes-6.patch, failed testing.

andypost’s picture

Status: Needs work » Needs review
FileSize
2.27 KB
12.38 KB

Add missed routes

Status: Needs review » Needs work

The last submitted patch, 8: 2314889-entity_test-routes-8.patch, failed testing.

andypost’s picture

Status: Needs work » Needs review
FileSize
2.28 KB
11.98 KB

Proper fix for routes, should be green

andypost’s picture

FileSize
686 bytes
11.99 KB

Fix one more inconsistency

andypost’s picture

+++ b/core/modules/comment/src/Tests/CommentNonNodeTest.php
@@ -430,6 +430,8 @@ public function testsNonIntegerIdEntities() {
+    // Ensure a core field type shown.
+    $this->assertOption('edit-fields-add-new-field-type', 'boolean');

@@ -440,6 +442,8 @@ public function testsNonIntegerIdEntities() {
+    // Ensure a core field type shown.
+    $this->assertOption('edit-fields-add-new-field-type', 'boolean');

I think we should add this within the conversion because that conversion uncovered that test incomplete

andypost’s picture

Issue tags: +Entity Field API

@fago Crell said that it needs your review

andypost’s picture

re-roll

andypost’s picture

Assigned: fago » Berdir

Meta issue closed #2285413: [Meta] Standardize entity route names because this only one left
Suppose @Berdir knows entity_test better after #1976158: Rename entity storage/list/form/render "controllers" to handlers ;)

fago’s picture

Not sure what the question is here even?

Entity test types is just a bunch of entity types used in various test cases. A lot of them only extend EntityTest to add in some custom entity definitions which is then used/tested in a test case. If links are unused / wrong they can/should be removed of course.

dawehner’s picture

Status: Needs review » Reviewed & tested by the community

@andypost
As you probably saw some of these routes defined here aren't defined but well, this isn't changed but this patch.

andypost’s picture

I checked this again, and really can't find unused ones...

  1. +++ b/core/modules/system/tests/modules/entity_test/entity_test.routing.yml
    @@ -6,35 +6,35 @@ entity_test.render:
    +entity.entity_test.delete_form:
    ...
    +entity.entity_test_mul.delete_form:
    ...
    +entity.entity_test_mulrev.delete_form:
    ...
    +entity.entity_test_rev.delete_form:
    
    +++ b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTest.php
    @@ -41,11 +41,11 @@
    + *     "delete-form" = "entity.entity_test.delete_form",
    
    +++ b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestMul.php
    @@ -37,11 +37,11 @@
    + *     "delete-form" = "entity.entity_test_mul.delete_form",
    
    +++ b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestMulRev.php
    @@ -38,9 +38,9 @@
    + *     "delete-form" = "entity.entity_test_mulrev.delete_form",
    
    +++ b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestRev.php
    @@ -36,9 +36,9 @@
    + *     "delete-form" = "entity.entity_test_rev.delete_form",
    

    delete - fine

  2. +++ b/core/modules/system/tests/modules/entity_test/entity_test.routing.yml
    @@ -6,35 +6,35 @@ entity_test.render:
    +entity.entity_test.render_options:
    
    @@ -45,14 +45,14 @@ entity_test.render_options:
    +entity.entity_test.render_no_view_mode:
    ...
    +entity.entity_test.list_referencing_entities:
    

    this is used in tests

dawehner’s picture

mh, maybe I was remembering it wrong.

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed to 8.x. Thanks!

  • webchick committed fb55791 on 8.0.x
    Issue #2314889 by andypost, Temoor: Standardize entity_test entity route...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.