forked from ushahidi/platform
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcoverage.php
More file actions
19 lines (14 loc) · 683 Bytes
/
Copy pathcoverage.php
File metadata and controls
19 lines (14 loc) · 683 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<?php
require_once __DIR__ . '/../vendor/autoload.php';
$coverage = new \SebastianBergmann\CodeCoverage\CodeCoverage;
$coverage->setAddUncoveredFilesFromWhitelist(true);
$coverage->filter()->addDirectoryToWhitelist(__DIR__ . '/../application/');
$coverage->filter()->addDirectoryToWhitelist(__DIR__ . '/../src/');
$coverage->filter()->addDirectoryToWhitelist(__DIR__ . '/../plugins/*/classes/');
$coverage->start('behat-api-test');
// Initialize the Kohana application
include __DIR__ . '/index.php';
$coverage->stop();
$file = __DIR__ . '/../coverage/behat-' . uniqid() . '.xml';
$writer = new \SebastianBergmann\CodeCoverage\Report\Clover;
$writer->process($coverage, $file);