Menu

[r18]: / trunk / samples / local / codeCoverageMain.php  Maximize  Restore  History

Download this file

40 lines (34 with data), 1.2 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<?php
/*
* $Id: codeCoverageMain.php 49493 2006-04-08 00:16:04Z hkodungallur $
*
* Copyright(c) 2004-2006, SpikeSource Inc. All Rights Reserved.
* Licensed under the Open Software License version 2.1
* (See http://www.spikesource.com/license.html)
*/
?>
<?php
/**
* This file should be executed with following command
* Linux:
* $ (export PHPCOVERAGE_HOME=/path/to/phpcoverage/src; php codeCoverageMain.php)
* Windows:
* > set PHPCOVERAGE_HOME=/path/to/phpcoverage/src
* > php codeCoverageMain.php
*
*/
?>
<?php
require_once "phpcoverage.inc.php";
require_once PHPCOVERAGE_HOME . "/CoverageRecorder.php";
require_once PHPCOVERAGE_HOME . "/reporter/HtmlCoverageReporter.php";
$reporter = new HtmlCoverageReporter("Code Coverage Report", "", "report");
$includePaths = array(".");
$excludePaths = array("codeCoverageMain.php", "test_driver.php");
$cov = new CoverageRecorder($includePaths, $excludePaths, $reporter);
$cov->startInstrumentation();
include "test_driver.php";
$cov->stopInstrumentation();
$cov->generateReport();
$reporter->printTextSummary();
?>
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.