All Projects → edsonmedina → Php_testability

edsonmedina / Php_testability

Licence: gpl-2.0
Analyses and reports testability issues of a php codebase

Projects that are alternatives of or similar to Php testability

UTBotCpp
Tool that generates unit test by C/C++ source code, trying to reach all branches and maximize code coverage
Stars: ✭ 59 (-56.62%)
Mutual labels:  unit-testing, static-analysis
Cleancppproject
Clean C++ project for you to use. Features: Modern CMake, CPack, Doxygen, PlantUML, Catch Unit testing, static analysis
Stars: ✭ 276 (+102.94%)
Mutual labels:  static-analysis, unit-testing
goreporter
A Golang tool that does static analysis, unit testing, code review and generate code quality report.
Stars: ✭ 3,019 (+2119.85%)
Mutual labels:  unit-testing, static-analysis
Cmake Examples
Useful CMake Examples
Stars: ✭ 7,220 (+5208.82%)
Mutual labels:  static-analysis, unit-testing
Goreporter
A Golang tool that does static analysis, unit testing, code review and generate code quality report.
Stars: ✭ 2,943 (+2063.97%)
Mutual labels:  static-analysis, unit-testing
Cfn nag
Linting tool for CloudFormation templates
Stars: ✭ 808 (+494.12%)
Mutual labels:  static-analysis, unit-testing
Deequ
Deequ is a library built on top of Apache Spark for defining "unit tests for data", which measure data quality in large datasets.
Stars: ✭ 2,020 (+1385.29%)
Mutual labels:  unit-testing
Frama C Snapshot
Release snapshots of the Frama-C platform for source code analysis
Stars: ✭ 129 (-5.15%)
Mutual labels:  static-analysis
Stryker4s
Mutation testing for Scala. Work in progress...
Stars: ✭ 118 (-13.24%)
Mutual labels:  unit-testing
Config Lint
Command line tool to validate configuration files
Stars: ✭ 118 (-13.24%)
Mutual labels:  static-analysis
Dotnetlabs
.NET Labs -- Show Me the Tips and Tricks and Code
Stars: ✭ 135 (-0.74%)
Mutual labels:  unit-testing
Mazewalker
Toolkit for enriching and speeding up static malware analysis
Stars: ✭ 132 (-2.94%)
Mutual labels:  static-analysis
Njsscan
njsscan is a semantic aware SAST tool that can find insecure code patterns in your Node.js applications.
Stars: ✭ 128 (-5.88%)
Mutual labels:  static-analysis
Reading
A list of computer-science readings I recommend
Stars: ✭ 1,919 (+1311.03%)
Mutual labels:  static-analysis
Rstcheck
Checks syntax of reStructuredText and code blocks nested within it
Stars: ✭ 130 (-4.41%)
Mutual labels:  static-analysis
Test Smells
Test Smells for Android developers
Stars: ✭ 120 (-11.76%)
Mutual labels:  unit-testing
Nodejsscan
nodejsscan is a static security code scanner for Node.js applications.
Stars: ✭ 1,874 (+1277.94%)
Mutual labels:  static-analysis
Argus Saf
Argus static analysis framework
Stars: ✭ 117 (-13.97%)
Mutual labels:  static-analysis
Find Sec Bugs
The SpotBugs plugin for security audits of Java web applications and Android applications. (Also work with Kotlin, Groovy and Scala projects)
Stars: ✭ 1,748 (+1185.29%)
Mutual labels:  static-analysis
React Shopping Cart
🛍️ Simple ecommerce cart application built with React Redux
Stars: ✭ 1,808 (+1229.41%)
Mutual labels:  unit-testing

Build Status Code Climate Scrutinizer Code Quality Code Coverage Dependencies

PHP_Testability

Analyses and produces a report with testability issues of a php codebase.

Installation

PHP_Testability requires at least PHP 7.0 to run.

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.

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

And run composer update.

Or alternatively, just run:

composer require edsonmedina/php_testability "dev-master"

Usage

Analyse the current directory and generate an HTML report into report/

vendor/bin/testability . -o report

Exclude some directories

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

Check all the available options.

vendor/bin/testability --help

Results

Open report/index.html on your browser. You shoule see something like this:

Screenshot

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

Screenshot

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

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

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].