tests/ConversionTestCase.php
/**
     * Create a Route object which will return $expectedResponse.
     *
     * @param mixed $expectedResponse
     *
     * @return Route
     */
Create a Route object which will return $expectedResponse.
@param mixed $expectedResponse

@return Route
Create a Route object which will return $expectedResponse . @param mixed $expectedResponse @return Route
protected function createMockRouteWithCallback($expectedResponse): Route
    {
        $route = $this->createMock(Route::class);
        $route
            ->expects($this->any())
            ->method('getCallable')
            ->will(
                $this->returnValue(
                    function (ServerRequestInterface $request) use ($expectedResponse) {
                        return $expectedResponse;
                    })
            );
        return $route;
    }
protected function createMockRouteWithCallback ( $ expectedResponse ) : Route { $ route = $ this -> createMock ( Route :: class ) ; $ route -> expects ( $ this -> any ( ) ) -> method ( 'getCallable' ) -> will ( $ this -> returnValue ( function ( ServerRequestInterface $ request ) use ( $ expectedResponse ) { return $ expectedResponse ; } ) ) ; return $ route ; }
Create a Route object which will return $expectedResponse.
Create a Route object which will return $expectedResponse .