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
#6 Screen Shot 2013-08-16 at 5.56.43 PM.png54.56 KBdisasm
#4 drupal8.module_test.1987748-4.patch6.72 KBdisasm
FAILED: [[SimpleTest]]: [MySQL] 58,171 pass(es), 1 fail(s), and 0 exception(s).
[ View ]

Comments

Status:Active» Closed (won't fix)

Need to rewrite the whole module to make test sync with current test implementation. For more details, please refer: #1988802: [META] Rewrite test modules in system to provide better unit testing.

Status:Closed (won't fix)» Active

Title:Convert module_test_class_loading() to a new style controllerConvert module_test page callbacks to a new style controller
Assigned:Unassigned» disasm

Status:Active» Needs review
StatusFileSize
new6.72 KB
FAILED: [[SimpleTest]]: [MySQL] 58,171 pass(es), 1 fail(s), and 0 exception(s).
[ View ]

first pass

Status:Needs review» Needs work

The last submitted patch, drupal8.module_test.1987748-4.patch, failed testing.

StatusFileSize
new54.56 KB

I ran this by a couple people at MWDS. This is completely befuddling me (and a few others). The test expects the callback to return 'success!'

But, the callback only returns the parameter passed (the name of the module)

<?php
/**
* Page callback for 'hook dynamic loading' test.
*
* If the hook is dynamically loaded correctly, the menu callback should
* return 'success!'.
*/
function module_test_hook_dynamic_loading_invoke_all_during_load($param) {
  return
$param;
}
?>

Screenshot attached with path and callback output.

If anyone has any idea how this works, please let me know.

Thanks to Crell and YesCT, we tracked this down. Issue #752226: module_invoke() doesn't work with hooks placed in include files via hook_hook_info() added a test_hook that causes the module name to be replaced with the contents in that hook.

The hook is implemented in core/modules/system/tests/modules/module_test/module_test.file.inc. Not sure how to proceed with this.

Thanks for your work on this issue! Please see #1971384-43: [META] Convert page callbacks to controllers for an update on the routing system conversion process.