PHP Classes

File: code_coverage_example.php

Recommend this page to a friend!
  Packages of Ovidiu Lesei   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: 16 years ago
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();

?>