2017 © Pedro Peláez
 

library php_testability

Analyses and reports testability issues of a php codebase

image

edsonmedina/php_testability

Analyses and reports testability issues of a php codebase

  • Wednesday, November 1, 2017
  • by edsonmedina
  • Repository
  • 7 Watchers
  • 92 Stars
  • 14,194 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 3 Forks
  • 36 Open issues
  • 2 Versions
  • 15 % Grown

The README.md

Build Status Code Climate Scrutinizer Code Quality Code Coverage Dependencies, (*1)

PHP_Testability

Analyses and produces a report with testability issues of a php codebase., (*2)

Installation

PHP_Testability requires at least PHP 7.0 to run., (*3)

Composer

Add edsonmedina/php_testability as a dependency to your project's composer.json file if you use Composer to manage the dependencies of your project., (*4)

{
    "require-dev": {
        "edsonmedina/php_testability": "dev-master"
    }
}

And run composer update., (*5)

Or alternatively, just run:, (*6)

composer require edsonmedina/php_testability "dev-master"

Usage

Analyse the current directory and generate an HTML report into report/, (*7)

vendor/bin/testability . -o report

Exclude some directories, (*8)

vendor/bin/testability . -x vendor,tmp,upload,config -o report

Check all the available options., (*9)

vendor/bin/testability --help

Results

Open report/index.html on your browser. You shoule see something like this:, (*10)

Screenshot, (*11)

If you click on a file with issues, it'll show you a code browser and will highlight the lines with issues., (*12)

Screenshot, (*13)

These are issues that hinder testability, such as: * references to global variables, super globals, etc * calls to functions that can't be mocked (like static methods or global functions) * new instances of objects (tight coupling - can't be mocked/injected) * ...and much more, (*14)

Kudos to the brilliant PHP-Parser (by nikic) on which PHP_Testability relies heavily., (*15)

The Versions

01/11 2017

dev-master

9999999-dev https://github.com/edsonmedina/php_testability/

Analyses and reports testability issues of a php codebase

  Sources   Download

GPL-2.0+

The Requires

 

The Development Requires

by Edson Medina

tdd phpunit testing php unit testability

25/10 2014

dev-dashboard

dev-dashboard https://github.com/edsonmedina/php_testability/

Analyses and reports testability issues of a php codebase

  Sources   Download

GPL-2.0+

The Requires

 

The Development Requires

by Edson Medina

phpunit testing php unit testability