tests/ConversionTestCase.php
/**
     * Create a ResponseFactory which will return $expectedResponse.
     *
     * @param ResponseInterface $expectedResponse
     *
     * @return ResponseFactoryInterface
     */
Create a ResponseFactory which will return $expectedResponse.


Create a ResponseFactory which will return $expectedResponse .
protected function createMockResponseFactory(ResponseInterface $expectedResponse): ResponseFactoryInterface
    {
        $factory = $this->createMock(ResponseFactoryInterface::class);
        $factory
            ->expects($this->any())
            ->method('createResponse')
            ->willReturn($expectedResponse);
        return $factory;
    }
protected function createMockResponseFactory ( ResponseInterface $ expectedResponse ) : ResponseFactoryInterface { $ factory = $ this -> createMock ( ResponseFactoryInterface :: class ) ; $ factory -> expects ( $ this -> any ( ) ) -> method ( 'createResponse' ) -> willReturn ( $ expectedResponse ) ; return $ factory ; }
Create a ResponseFactory which will return $expectedResponse.
Create a ResponseFactory which will return $expectedResponse .