<?php
require 'vendor/autoload.php';
use SebastianBergmann\CodeCoverage\Filter;
use SebastianBergmann\CodeCoverage\Driver\Selector;
use SebastianBergmann\CodeCoverage\CodeCoverage;
use SebastianBergmann\CodeCoverage\Report\Html\Facade as HtmlReport;
include 'test.php';
$filter = new Filter;
$filter->includeFiles( [ '/test.php' ] );
$coverage = new CodeCoverage(
(new Selector)->forLineAndPathCoverage($filter),
$filter
);
$coverage->start('coverage1'); ifthenelse( true, false ); $coverage->stop();
$coverage->start('coverage2'); ifthenelse( false, true ); $coverage->stop();
(new HtmlReport)->process($coverage, '/tmp/code-coverage-report');