19 declare(strict_types=1);
    48     protected function setUp(): void
    50         $this->httpServiceMock = $this->getMockBuilder(Services::class)
    51                                       ->disableOriginalConstructor()
    60         $expectedHeader = 
'X-Sendfile';
    63         $response = $this->getMockBuilder(ResponseInterface::class)
    64                          ->disableOriginalConstructor()
    68                  ->method(
'withHeader')
    69                  ->with($expectedHeader, $filePath)
    72         $this->httpServiceMock->expects($this->once())
    76         $this->httpServiceMock->expects($this->once())
    77                               ->method(
'saveResponse')
    80         $this->httpServiceMock->expects($this->once())
    81                               ->method(
'sendResponse');
    83         $fileDeliveryType = 
new XSendfile($this->httpServiceMock);
    84         $fileDeliveryType->deliver($filePath, 
false);
 
Services $httpServiceMock
 
testSendFileWithXSendHeaderWhichShouldSucceed()