| Total Complexity | 4 |
| Total Lines | 26 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 11 | abstract class CollectorTestCase extends TestCase |
||
| 12 | { |
||
| 13 | public function testCollect(): void |
||
| 14 | { |
||
| 15 | $collector = $this->getCollector(); |
||
| 16 | $collector->startup(); |
||
| 17 | $this->collectTestData($collector); |
||
| 18 | $this->checkCollectedData($collector); |
||
| 19 | $this->checkIndexData($collector); |
||
| 20 | $collector->shutdown(); |
||
| 21 | $this->assertSame(get_class($collector), $collector->getName()); |
||
| 22 | } |
||
| 23 | |||
| 24 | abstract protected function getCollector(): CollectorInterface; |
||
| 25 | |||
| 26 | abstract protected function collectTestData(CollectorInterface $collector): void; |
||
| 27 | |||
| 28 | protected function checkCollectedData(CollectorInterface $collector): void |
||
| 31 | } |
||
| 32 | |||
| 33 | protected function checkIndexData(CollectorInterface $collector): void |
||
| 40 |