Skip to content

Commit de06cdd

Browse files
committed
fix UrlFactoryTest
1 parent 5248b61 commit de06cdd

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

src/LiveComponent/src/EventListener/LiveUrlSubscriber.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,7 @@ private function getLivePropsToMap(Request $request): array
8383
'path' => [],
8484
'query' => [],
8585
];
86-
foreach ($metadata->getAllLivePropsMetadata($component) as $livePropMetadata) {
87-
$name = $livePropMetadata->getName();
88-
$urlMapping = $livePropMetadata->urlMapping();
86+
foreach ($metadata->getAllUrlMappings() as $name => $urlMapping) {
8987
if (isset($values[$name]) && $urlMapping) {
9088
$urlLiveProps[$urlMapping->mapPath ? 'path' : 'query'][$urlMapping->as ?? $name] =
9189
$values[$name];

src/LiveComponent/tests/Unit/Util/UrlFactoryTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ public function testMissingMandatoryParametersException(): void
148148
$router->expects(self::once())
149149
->method('match')
150150
->with($previousUrl)
151-
->willReturn($matchedRoute);
151+
->willReturn(['_route' => $matchedRoute]);
152152
$router->expects(self::once())
153153
->method('generate')
154154
->with($matchedRoute, [])

0 commit comments

Comments
 (0)