/** * Collect clover XML into json_file. * * @return \Satooshi\Bundle\CoverallsV1Bundle\Repository\JobsRepository */ protected function collectCloverXml() { $this->logger->info('Load coverage clover log:'); foreach ($this->config->getCloverXmlPaths() as $path) { $this->logger->info(sprintf(' - %s', $path)); } $jsonFile = $this->api->collectCloverXml()->getJsonFile(); if ($jsonFile->hasSourceFiles()) { $this->logCollectedSourceFiles($jsonFile); } return $this; }
/** * @test */ public function shouldCollectCloverXmlExcludingNoStatementsFiles() { $this->makeProjectDir(null, $this->logsDir); $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; }