Skip to content

Commit da6ecc6

Browse files
committed
make test work with newer symfony versions
1 parent b6bc682 commit da6ecc6

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

src/Event/RouterMatchEvent.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public function __construct(Request $request = null)
3030
}
3131

3232
/**
33-
* @return Request | null
33+
* @return Request|null
3434
*/
3535
public function getRequest()
3636
{

tests/Unit/Routing/ChainRouterTest.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -476,14 +476,19 @@ public function testMatchRequestNotFound()
476476
public function testMatchWithRequestMatchersNotFound()
477477
{
478478
$url = '/test';
479-
$request = Request::create('/test');
479+
$expected = Request::create('/test');
480+
$expected->server->remove('REQUEST_TIME_FLOAT');
480481

481482
$high = $this->createMock(RequestMatcher::class);
482483

483484
$high
484485
->expects($this->once())
485486
->method('matchRequest')
486-
->with($request)
487+
->with($this->callback(function (Request $actual) use ($expected): bool {
488+
$actual->server->remove('REQUEST_TIME_FLOAT');
489+
490+
return $actual == $expected;
491+
}))
487492
->will($this->throwException(new ResourceNotFoundException()))
488493
;
489494

0 commit comments

Comments
 (0)