function testGetfilenames()
 {
     $handler = new CoverageDataHandler($this->tempdb());
     $handler->createSchema();
     $rawCoverage = array('file0' => array(), 'file1' => array());
     $handler->write($rawCoverage);
     $actual = $handler->getFilenames();
     $this->assertEqual(array('file0', 'file1'), $actual);
 }
Beispiel #2
0
 public function stopCoverage()
 {
     $cov = xdebug_get_code_coverage();
     $this->filter($cov);
     $data = new CoverageDataHandler($this->log);
     chdir($this->root);
     $data->write($cov);
     unset($data);
     // release sqlite connection
     xdebug_stop_code_coverage();
     // make sure we wind up on same current working directory, otherwise
     // coverage handler writer doesn't know what directory to chop off
     chdir($this->root);
 }