コード例 #1
0
 /**
  * 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);
 }
コード例 #2
0
 public function testIsEnabledWhenFileMissing()
 {
     $repository = new CodeCoverageRepository($this->databaseConfig, $this->databaseDirectory, $this->sqlite);
     $this->assertFalse($repository->isEnabled());
 }