/** * Get code coverage (output raw coverage data as JSON) * * @return \Symfony\Component\HttpFoundation\Response */ public function readAction() { $coverage = $this->repository->getCoverage(); return new Response(json_encode($coverage), 200, array('content-type' => 'application/json')); }
public function testGetCoverageWhenTableNotCreated() { \VIPSoft\CodeCoverageBundle\Test\SQLite3::$proxiedMethods['query'] = function () { return false; }; $repository = new CodeCoverageRepository($this->databaseConfig, $this->databaseDirectory, $this->sqlite); $this->assertEquals(array(), $repository->getCoverage()); }