From f11c6f4c403165ed3250b8f931ea04e4646b5b95 Mon Sep 17 00:00:00 2001 From: Markus Bachmann Date: Wed, 1 Mar 2023 14:48:29 +0100 Subject: [PATCH] Add testcase for nested extra keys The RouteVoter want multiple values in order to mark an item as active. --- .../Fixtures/Bundle2/Resources/config/navigation.yml | 3 +++ Tests/Provider/ConfigurationMenuProviderTest.php | 2 ++ 2 files changed, 5 insertions(+) diff --git a/Tests/DependencyInjection/Fixtures/Bundle2/Resources/config/navigation.yml b/Tests/DependencyInjection/Fixtures/Bundle2/Resources/config/navigation.yml index 2a6a68d..5ba1850 100644 --- a/Tests/DependencyInjection/Fixtures/Bundle2/Resources/config/navigation.yml +++ b/Tests/DependencyInjection/Fixtures/Bundle2/Resources/config/navigation.yml @@ -27,6 +27,9 @@ main: extras: key1: value1 key2: value2 + routes: + - pattern: /^foo/ + - pattern: /^bar/ four_item: label: "Four Item Label" order: 40 diff --git a/Tests/Provider/ConfigurationMenuProviderTest.php b/Tests/Provider/ConfigurationMenuProviderTest.php index 4601f36..54c22d0 100644 --- a/Tests/Provider/ConfigurationMenuProviderTest.php +++ b/Tests/Provider/ConfigurationMenuProviderTest.php @@ -121,6 +121,8 @@ public function testGet(): void 'key1' => 'value1', 'key2' => 'value2', 'routes' => array( + array('pattern' => '/^foo/'), + array('pattern' => '/^bar/'), array('route' => 'my_route', 'parameters' => array('test' => 'test1')) ) ),