#docker #cli #test-cases #phpunit #neotest

app neotest-docker-phpunit

A tool to execute phpunit test cases in the docker container and export the results

5 releases

0.1.4 Sep 4, 2024
0.1.3 Sep 4, 2024
0.1.2 Mar 26, 2024
0.1.1 Mar 26, 2024
0.1.0 Mar 26, 2024

#1333 in Command line utilities

Download history 249/week @ 2024-08-31 26/week @ 2024-09-07 41/week @ 2024-09-14 18/week @ 2024-09-21 8/week @ 2024-09-28

178 downloads per month

MIT/Apache

8KB
124 lines

PHPUnit docker test

Run phpunit tests in the docker container. This is a helper lib for neotest-docker-phpunit but works standalone.

Installation

Install from source

git clone https://github.com/praem90/neotest-docker-phpunit.git
cd neotest-docker-phpunit
cargo build

Install from cargo

cargo install neotest-docker-phpunit

Usage

neotest-docker-phpunit /path/to/php/file/folder --log-junit=path/to/the/result.xml --container=php --volume="docker/style/:volume/map" --standalone=false

Args

  • --container name or id of the phpunit container
  • --volume Map work dir to the container like docker's volume mount. E.g., host/path:docker/path
  • --standalone Whether use docker compose or not. Default false means docker compose will be used
  • --log-junit Unit test results xml file. Unit test results will be stored in this file.

TODO

  • Unit tests
  • Improve STDOUT
  • Make the root_dir, container name and coompose as args
  • Create a neotest-docker-phpunit adapter for the neotest plugin

Dependencies

~2.7–3.5MB
~63K SLoC