GithubHelp home page GithubHelp logo

informaticacba / php-code-coverage Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sebastianbergmann/php-code-coverage

1.0 0.0 0.0 49.43 MB

Library that provides collection, processing, and rendering functionality for PHP code coverage information.

License: Other

PHP 56.86% CSS 0.25% HTML 42.70% JavaScript 0.19%

php-code-coverage's Introduction

phpunit/php-code-coverage

Latest Stable Version CI Status Type Coverage codecov

Provides collection, processing, and rendering functionality for PHP code coverage information.

Installation

You can add this library as a local, per-project dependency to your project using Composer:

composer require phpunit/php-code-coverage

If you only need this library during development, for instance to run your project's test suite, then you should add it as a development-time dependency:

composer require --dev phpunit/php-code-coverage

Usage

<?php declare(strict_types=1);
use SebastianBergmann\CodeCoverage\Filter;
use SebastianBergmann\CodeCoverage\Driver\Selector;
use SebastianBergmann\CodeCoverage\CodeCoverage;
use SebastianBergmann\CodeCoverage\Report\Html\Facade as HtmlReport;

$filter = new Filter;
$filter->includeDirectory('/path/to/directory');

$coverage = new CodeCoverage(
    (new Selector)->forLineCoverage($filter),
    $filter
);

$coverage->start('<name of test>');

// ...

$coverage->stop();


(new HtmlReport)->process($coverage, '/tmp/code-coverage-report');

php-code-coverage's People

Contributors

alexshadow007 avatar andyg0808 avatar ashnazg avatar bastien-phi avatar bwoebi avatar cbandy avatar crishoj avatar danielpalme avatar dekker-m avatar derickr avatar duncan3dc avatar dvdoug avatar fabpot avatar grahamcampbell avatar hpbuniat avatar jeroendedauw avatar kelunik avatar krakjoe avatar localheinz avatar maks3w avatar remicollet avatar rohm1 avatar sebastianbergmann avatar slamdunk avatar staabm avatar theseer avatar tombevers avatar tysonandre avatar wes0617 avatar whatthejeff avatar

Stargazers

 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.