Menu

Tree [r1] / samples / local /
 History

HTTPS access


File Date Author Commit
 README 2006-04-22 npac [r1] - Added initial version of PHPCoverage from trunk
 codeCoverageMain.php 2006-04-22 npac [r1] - Added initial version of PHPCoverage from trunk
 phpcoverage.inc.php 2006-04-22 npac [r1] - Added initial version of PHPCoverage from trunk
 sample.php 2006-04-22 npac [r1] - Added initial version of PHPCoverage from trunk
 sample2.php 2006-04-22 npac [r1] - Added initial version of PHPCoverage from trunk

Read Me

################################################################################
#  $Id: README 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)
################################################################################
################################################
# Spike PHPCoverage Local Code Coverage Sample
################################################

This sample has a single PHP file taken straight from the Xdebug 
documentation - named as "sample.php". 

The codeCoverageMain.php is the wrapper script that sets up the 
code coverage recording and then executes the "sample.php" file.
The code coverage report is generated in a directory called 
"report" in the current working directory.

To execute this sample, run the following commands assuming that 
the PHP command line executable is in your path.

Linux:
  $ (export PHPCOVERAGE_HOME=/path/to/phpcoverage/src; php codeCoverageMain.php)

Windows: 
  C:\> set PHPCOVERAGE_HOME=\path\to\phpcoverage\src
  C:\> php codeCoverageMain.php


The expected output should be something like this:

##############################################
 Code Coverage Summary: Code Coverage Report
   Total Files: 2
   Total Lines: 94
   Total Covered Lines of Code: 22
   Total Missed Lines of Code: 3
   Total Lines of Code: 25
   Code Coverage: 88%
##############################################

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.