Git Product home page Git Product logo

phpcov's Introduction

phpcov

phpcov is a command-line frontend for the PHP_CodeCoverage library.

Installation

phpcov should be installed using the PEAR Installer, the backbone of the PHP Extension and Application Repository that provides a distribution system for PHP packages.

Depending on your OS distribution and/or your PHP environment, you may need to install PEAR or update your existing PEAR installation before you can proceed with the following instructions. sudo pear upgrade PEAR usually suffices to upgrade an existing PEAR installation. The PEAR Manual explains how to perform a fresh installation of PEAR.

The following two commands are all that is required to install phpcov using the PEAR Installer:

pear config-set auto_discover 1
pear install pear.phpunit.de/phpcov

Usage

sb@vmware examples % cat add.php
<?php
$a = 1;
$b = 2;
print $a + $b;

sb@vmware examples % phpcov --clover clover.xml add.php
phpcov 1.0.0 by Sebastian Bergmann.

3

sb@vmware examples % cat clover.xml
<?xml version="1.0" encoding="UTF-8"?>
<coverage generated="1270365900">
  <project timestamp="1270365900">
    <file name="/usr/local/src/bytekit-cli/examples/add.php">
      <line num="2" type="stmt" count="1"/>
      <line num="3" type="stmt" count="1"/>
      <line num="4" type="stmt" count="1"/>
      <line num="5" type="stmt" count="1"/>
      <metrics loc="4" ncloc="4" classes="0" methods="0"
               coveredmethods="0" conditionals="0"
               coveredconditionals="0" statements="4"
               coveredstatements="4" elements="4"
               coveredelements="4"/>
    </file>
    <metrics files="1" loc="4" ncloc="4" classes="0" methods="0"
             coveredmethods="0" conditionals="0"
             coveredconditionals="0" statements="4"
             coveredstatements="4" elements="4"
             coveredelements="4"/>
  </project>
</coverage>

phpcov's People

Contributors

alexanderilyin avatar kukulich avatar sebastianbergmann avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.