Definition at line 45 of file HTTPServicesTest.php.
 
◆ setUp()
  
  
      
        
          | ILIAS\DI\HTTPServicesTest::setUp  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
protected   | 
  
 
Definition at line 70 of file HTTPServicesTest.php.
   73         $this->mockRequestFactory = $this->getMockBuilder(RequestFactory::class)->getMock();
    75         $this->mockResponseFactory = $this->getMockBuilder(ResponseFactory::class)->getMock();
    77         $this->mockSenderStrategy = $this->getMockBuilder(ResponseSenderStrategy::class)->getMock();
    79         $this->mockCookieJarFactory = $this->getMockBuilder(CookieJarFactory::class)->getMock();
    81         $this->mockDurationFactory = $this->createMock(DurationFactory::class);
    83         $this->httpState = 
new RawHTTPServices($this->mockSenderStrategy, $this->mockCookieJarFactory, $this->mockRequestFactory, $this->mockResponseFactory, $this->mockDurationFactory);
  
 
 
◆ testRequestWhichShouldGenerateANewRequestOnce()
      
        
          | ILIAS\DI\HTTPServicesTest::testRequestWhichShouldGenerateANewRequestOnce  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 90 of file HTTPServicesTest.php.
   92         $expectedRequest = $this->getMockBuilder(ServerRequestInterface::class)->getMock();
    93         $wrongRequest = $this->getMockBuilder(ServerRequestInterface::class)->getMock();
    95         $this->mockRequestFactory->expects($this->once())
    97             ->willReturn($expectedRequest, $wrongRequest);
   102         $request1 = $this->httpState->request();
   105         $request2 = $this->httpState->request();
   108         $this->assertEquals($expectedRequest, $request1);
   109         $this->assertEquals($expectedRequest, $request2);
  
 
 
◆ testResponseWhichShouldGenerateANewResponseOnce()
      
        
          | ILIAS\DI\HTTPServicesTest::testResponseWhichShouldGenerateANewResponseOnce  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 116 of file HTTPServicesTest.php.
  118         $expectedResponse = $this->getMockBuilder(ResponseInterface::class)->getMock();
   119         $wrongResponse = $this->getMockBuilder(ResponseInterface::class)->getMock();
   121         $this->mockResponseFactory->expects($this->once())
   123             ->willReturn($expectedResponse, $wrongResponse);
   128         $response1 = $this->httpState->response();
   131         $response2 = $this->httpState->response();
   134         $this->assertEquals($expectedResponse, $response1);
   135         $this->assertEquals($expectedResponse, $response2);
  
 
 
◆ $httpState
  
  
      
        
          | GlobalHttpState ILIAS\DI\HTTPServicesTest::$httpState | 
         
       
   | 
  
private   | 
  
 
 
◆ $mockCookieJarFactory
  
  
      
        
          | CookieJarFactory MockObject ILIAS\DI\HTTPServicesTest::$mockCookieJarFactory | 
         
       
   | 
  
private   | 
  
 
 
◆ $mockDurationFactory
  
  
      
        
          | DurationFactory ILIAS\DI\HTTPServicesTest::$mockDurationFactory | 
         
       
   | 
  
private   | 
  
 
 
◆ $mockRequestFactory
  
  
      
        
          | RequestFactory MockObject ILIAS\DI\HTTPServicesTest::$mockRequestFactory | 
         
       
   | 
  
private   | 
  
 
 
◆ $mockResponseFactory
  
  
      
        
          | ResponseFactory MockObject ILIAS\DI\HTTPServicesTest::$mockResponseFactory | 
         
       
   | 
  
private   | 
  
 
 
◆ $mockSenderStrategy
  
  
      
        
          | DurationFactory MockObject ILIAS\DI\HTTPServicesTest::$mockSenderStrategy | 
         
       
   | 
  
private   | 
  
 
 
The documentation for this class was generated from the following file: