/** * Collect clover XML into json_file. * * @param Configuration $config Configuration. * @return \Contrib\Bundle\CoverallsV1Bundle\Command\CoverallsV1JobsCommand */ protected function collectCloverXml(Configuration $config) { $this->logger->info('Load coverage clover log:'); foreach ($config->getCloverXmlPaths() as $path) { $this->logger->info(sprintf(' - %s', $path)); } $this->api->collectCloverXml(); $jsonFile = $this->api->getJsonFile(); if ($jsonFile->hasSourceFiles()) { $this->logCollectedSourceFiles($jsonFile); } return $this; }
/** * @test */ public function collectCloverXmlExcludingNoStatementsFiles() { $xml = $this->getCloverXml(); file_put_contents($this->cloverXmlPath, $xml); $config = $this->createConfiguration()->setExcludeNoStatements(true); $object = new Jobs($config); $same = $object->collectCloverXml(); // return $this $this->assertSame($same, $object); return $object; }