We want all examples modules to use a *.menu_links.yml file to define a menu link.

The Tour Example uses the deprecated hook_menu() to define menu links, so it needs to be converted.

You can learn about this change to Drupal in this change record: https://drupal.org/node/2228089

Steps to complete in order to finish this task:

  • Assign yourself to this issue.
  • Check out Examples.
  • Convert hook_menu() to a file called tour_example.menu_links.yml.
  • Write a test which verifies that the menu links appear on the page where they're supposed to appear. PHPUnit Example has a test for this, which should be emulated.
  • Write a test which performs a drupalGet() on each path, to verify that the route is defined.
  • Submit the patch.
  • Be lauded as a hero!

Comments

piestep’s picture

Status: Active » Needs review
StatusFileSize
new3.19 KB

Update tour_example with 1) to use *.menu_links.yml, 2) added test to verify Tool Menu link, and 3) test for tour_example page.

mile23’s picture

Status: Needs review » Needs work
+++ b/tour_example/lib/Drupal/tour_example/Tests/TourExampleTest.php
@@ -30,6 +45,25 @@ class TourExampleTest extends TourTestBasic {
   /**
+   * Main test.
+   *
+   * Enable Tour Example and see if it can successfully ¶
+   * return its main page and if there is a link to the ¶
+   * tour example in the Tools menu.
+   */

Needs to wrap out as close t 80 chars as you can, and also have no trailing spaces.

martin107’s picture

Status: Needs work » Needs review
StatusFileSize
new3.11 KB

Patch not longer applied, so this is the psr-4 reroll

Plus I have removed the whitespace issue.

mile23’s picture

Status: Needs review » Fixed

Thanks, piestep, and thanks martin107 for the re-roll!

  • Commit 5986732 on 8.x-1.x authored by piestep, committed by Mile23:
    Issue #2277367 by martin107, piestep | Mile23: Update Tour Example to...

Status: Fixed » Closed (fixed)

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