Skip to content

Commit

Permalink
Merge pull request #26 from Baachi/feature/nested-extra-keys
Browse files Browse the repository at this point in the history
Add testcase for nested extra keys
  • Loading branch information
jbouzekri authored Mar 2, 2023
2 parents 538ee5f + fbd5959 commit e34a3d3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Config/Definition/Builder/MenuNodeDefinition.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public function menuNodeHierarchy(int $depth = 10): NodeParentInterface
->end()
->end()
->arrayNode('extras')
->prototype('scalar')
->prototype('variable')
->end()
->end()
->menuNode('children')->menuNodeHierarchy($depth - 1)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ main:
extras:
key1: value1
key2: value2
routes:
- pattern: /^foo/
- pattern: /^bar/
four_item:
label: "Four Item Label"
order: 40
Expand Down
2 changes: 2 additions & 0 deletions Tests/Provider/ConfigurationMenuProviderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'))
)
),
Expand Down

0 comments on commit e34a3d3

Please sign in to comment.