segrax / php-testing

A collection of PHP testing tools bundled into a docker container

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

segrax/php-testing

Software License

A collection of PHP testing tools bundled into a docker container.

Usage

See below in Commands for all available parameters

Execute all tests

docker run --rm --volume c:/work/myapp:/srv/app segrax/php-testing tests

Execute phpcbf

docker run --rm --volume c:/work/myapp:/srv/app segrax/php-testing phpcbf

Configuration files

Some tools require configuration, place these files in the root of the volume mount (or inside /app if it exists)

Tool File
phpstan /phpstan.neon
psalm /psalm.xml
phpunit /phpunit.xml

Commands

Each tool can be either individually executed or related tools sequentually. To run an individual tool, simply change the command on the end of the docker run command.

Individual tools

Command Description Tool
composer-install Execute a composer install, with optimization Composer
composer-install-dev Execute a development install Composer
composer-update Execute an update Composer
phpassume Find assumptions PHP Assumptions
phplint Validate php syntax PHP Parallel Lint
phpcbf Fix PSR1 and PSR12 violations PHP CBF
phpcs Validate against PSR1 and PSR12 PHP CodeSniffer
phpcpd Find copy and pasted code PHP Copy/Paste Detector
phpmd Find messy code PHP Mess Detector
phpstan Find code mistakes PHP Static Analysis Tool
phpunit Execute phpunit tests PHPUnit
psalm Find code mistakes Psalm

Sequential tools

Command Tools
tools-code phpassume, phplint, phpcs, phpcpd, phpmd
tools-static phpstan, psalm
tests tools-code, tools-static, phpunit

Installed PHP Extensions

  • json
  • sockets
  • xdebug
  • zip

License

The MIT License (MIT). Please see License File for more information.

About

A collection of PHP testing tools bundled into a docker container

License:MIT License


Languages

Language:Makefile 67.6%Language:Dockerfile 21.9%Language:Shell 9.4%Language:Batchfile 1.1%