Part of #1971384: [META] Convert page callbacks to controllers

For instructions on how to convert a page callback into a controller, see the WSCCI Conversion Guide.

Files: 
CommentFileSizeAuthor
#10 drupal-remove-node_access_useless_callbacks-1987758-10.patch6.03 KBjuampy
PASSED: [[SimpleTest]]: [MySQL] 56,506 pass(es).
[ View ]
#8 drupal-remove-node_access_test_page-1987758-8.patch3.67 KBjuampy
PASSED: [[SimpleTest]]: [MySQL] 57,944 pass(es).
[ View ]
#4 1987758-node-access-test-page-controller-1.patch5.33 KBNiklas Fiekas
PASSED: [[SimpleTest]]: [MySQL] 56,258 pass(es).
[ View ]

Comments

Assigned:Unassigned» cecrs

Assigned:cecrs» Unassigned

Assigned:Unassigned» Niklas Fiekas

Assigned:Niklas Fiekas» Unassigned
Status:Active» Needs review
StatusFileSize
new5.33 KB
PASSED: [[SimpleTest]]: [MySQL] 56,258 pass(es).
[ View ]

A first stab at this.

Status:Needs review» Reviewed & tested by the community

It seems to be an INSANE idea to have a page to show the database query, so you can check it in your test, but yeah let's open a follow up to use a better approach.

+++ b/core/modules/node/tests/modules/node_access_test/node_access_test.moduleundefined
@@ -83,12 +83,6 @@ function node_access_test_permission() {
-  $items['node_access_test_page'] = array(
-    'title' => 'Node access test',
-    'page callback' => 'node_access_test_page',
-    'access arguments' => array('access content'),
-    'type' => MENU_SUGGESTED_ITEM,
-  );

Technically we don't remove the hook_menu entry if it is not a MENU_CALLBACK, but this is just about checking the page output.

Title:Convert node_access_test_page() to a new style controllerRemove node_access_test_page()
Status:Reviewed & tested by the community» Needs work

It is totally insane to do the test this way.

Lets remove hook_menu, page callback and testNodeQueryAlterWithUI as this test is repeated with the low level tests.

Status:Needs work» Needs review
StatusFileSize
new3.67 KB
PASSED: [[SimpleTest]]: [MySQL] 57,944 pass(es).
[ View ]

Here you are.

There is not only node_access_test_page but also node_access_entity_test_page so maybe we should get rid of that one as well.

StatusFileSize
new6.03 KB
PASSED: [[SimpleTest]]: [MySQL] 56,506 pass(es).
[ View ]

Sure! Closed #1987756: Remove node_access_entity_test_page().

Here is a patch which gets rid of both.

Status:Needs review» Reviewed & tested by the community

good riddance

Status:Reviewed & tested by the community» Fixed

Committed 30a45ad and pushed to 8.x. Thanks!

Status:Fixed» Closed (fixed)

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

This removed the only test method in that test, which means that it now spits out FATAL messages in the CLI test runner and the UI breaks: #2056293: Remove empty test Drupal\node\Tests\NodeEntityFieldQueryAlterTest