/** * Stop collecting at the end of a request * * @param \Symfony\Component\HttpKernel\Event\PostResponseEvent $event */ public function onKernelTerminate(PostResponseEvent $event) { if (!$this->driver || !$this->repository->isEnabled()) { return; } $coverage = $this->driver->stop(); $this->repository->addCoverage($coverage); }
public function testIsEnabledWhenFileMissing() { $repository = new CodeCoverageRepository($this->databaseConfig, $this->databaseDirectory, $this->sqlite); $this->assertFalse($repository->isEnabled()); }