| Total Complexity | 4 | 
| Total Lines | 26 | 
| Duplicated Lines | 0 % | 
| Changes | 0 | ||
| 1 | <?php  | 
            ||
| 18 | final class WebAppInfoCollectorTest extends AbstractCollectorTestCase  | 
            ||
| 19 | { | 
            ||
| 20 | /**  | 
            ||
| 21 | * @param CollectorInterface|WebAppInfoCollector $collector  | 
            ||
| 22 | */  | 
            ||
| 23 | protected function collectTestData(CollectorInterface $collector): void  | 
            ||
| 24 |     { | 
            ||
| 25 | $requestMock = $this->createMock(ServerRequestInterface::class);  | 
            ||
| 26 |         $requestMock->method('getAttribute')->willReturn(microtime(true)); | 
            ||
| 27 | $collector->collect(new BeforeRequest($requestMock));  | 
            ||
| 28 | |||
| 29 | DIRECTORY_SEPARATOR === '\\' ? sleep(1) : usleep(123_000);  | 
            ||
| 
                                                                                                    
                        
                         | 
                |||
| 30 | |||
| 31 | $collector->collect(new AfterRequest($this->createMock(ResponseInterface::class)));  | 
            ||
| 32 | }  | 
            ||
| 33 | |||
| 34 | protected function getCollector(): CollectorInterface  | 
            ||
| 35 |     { | 
            ||
| 36 | return new WebAppInfoCollector();  | 
            ||
| 37 | }  | 
            ||
| 38 | |||
| 39 | protected function checkCollectedData(array $data): void  | 
            ||
| 40 |     { | 
            ||
| 41 | parent::checkCollectedData($data);  | 
            ||
| 42 | |||
| 43 | $this->assertGreaterThan(0.122, $data['requestProcessingTime']);  | 
            ||
| 44 | }  | 
            ||
| 46 |