Login   Register  
PHP Classes
elePHPant
Icontem

File: code_coverage_example.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Ovidiu Mihalas  >  Xdebug code coverage  >  code_coverage_example.php  >  Download  
File: code_coverage_example.php
Role: Example script
Content type: text/plain
Description: Xdebug example
Class: Xdebug code coverage
Generate Xdebug code coverage reports
Author: By
Last change:
Date: 2009-12-10 05:07
Size: 482 bytes
 

Contents

Class file image Download
<?php
    
require_once './code_coverage_class.php';

    
xdebug_start_code_coverage();

    function 
a($a)
    {
         
$a 2.5;
    }

    function 
b($count)
    {
        for (
$i 0$i $count$i++)
        {
            
a($i 0.17);
        }
    }

    
b(6);
    
b(10);

    
$code_coverage = new code_coverage('c:/tmp/code_coverage.var','c:/tmp/code_coverage_reports/');
    
$code_coverage->code_coverage_analysis_save();
    
$code_coverage->code_coverage_reports();

?>