Subissue of #1787218: Convert testing variables to state system..

Change the variables menu_test_active_trail_initial, menu_test_hook_custom_theme_name, menu_test_menu_tree_set_path and menu_test_record_active_trail to the state system.

Files: 
CommentFileSizeAuthor
#10 1843954-menu_to_state-drupal8-10.patch6.94 KBACF
PASSED: [[SimpleTest]]: [MySQL] 48,978 pass(es).
[ View ]
#5 1843954-menu_to_state-drupal8-5.patch6.88 KBACF
PASSED: [[SimpleTest]]: [MySQL] 48,931 pass(es).
[ View ]
#1 1843954-menu_to_state-drupal8-1.patch6.88 KBACF
FAILED: [[SimpleTest]]: [MySQL] Failed to run tests: failed during invocation of run-tests.sh.
[ View ]

Comments

ACF’s picture

Status:Active» Needs review
StatusFileSize
new6.88 KB
FAILED: [[SimpleTest]]: [MySQL] Failed to run tests: failed during invocation of run-tests.sh.
[ View ]

patch attached.

aspilicious’s picture

Status:Needs review» Reviewed & tested by the community

Lets reroll and see if its still green

aspilicious’s picture

Status:Reviewed & tested by the community» Needs work
Issue tags:+Configuration system, +Config novice, +State system

The last submitted patch, 1843954-menu_to_state-drupal8-1.patch, failed testing.

ACF’s picture

Status:Needs work» Needs review
StatusFileSize
new6.88 KB
PASSED: [[SimpleTest]]: [MySQL] 48,931 pass(es).
[ View ]

re-rolled

Status:Needs review» Needs work
Issue tags:-Configuration system, -Config novice, -State system

The last submitted patch, 1843954-menu_to_state-drupal8-5.patch, failed testing.

ACF’s picture

Status:Needs work» Needs review
Issue tags:+Configuration system, +Config novice, +State system

#5: 1843954-menu_to_state-drupal8-5.patch queued for re-testing.

heyrocker’s picture

+++ b/core/modules/system/lib/Drupal/system/Tests/Menu/TrailTest.phpundefined
@@ -171,13 +171,13 @@ function testCustom403And404Pages() {
-      $initial_trail = variable_get('menu_test_active_trail_initial', array());
+      $initial_trail = state()->get('menu_test.active_trail_initial');

I'd like to see all these get() calls set with their old default values if not present. It just makes the code read a lot easier and its more plain what will happen if a value is ever not present.

Other than that this looks good.

heyrocker’s picture

Status:Needs review» Needs work
ACF’s picture

Status:Needs work» Needs review
StatusFileSize
new6.94 KB
PASSED: [[SimpleTest]]: [MySQL] 48,978 pass(es).
[ View ]

Updated with get defaults.

aspilicious’s picture

Status:Needs review» Reviewed & tested by the community

Should be fine now.

webchick’s picture

Status:Reviewed & tested by the community» Fixed

Committed and pushed to 8.x. Thanks!

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