public function handleStoresRouterMatchResultsInTheComponentContext() { $mockMatchResults = ['someRouterMatchResults']; $this->mockRouter->expects($this->atLeastOnce())->method('route')->with($this->mockHttpRequest)->will($this->returnValue($mockMatchResults)); $this->mockComponentContext->expects($this->atLeastOnce())->method('setParameter')->with(RoutingComponent::class, 'matchResults', $mockMatchResults); $this->routingComponent->handle($this->mockComponentContext); }