ivanrosolen / docker-phpqa

Docker tools to easily create and run tests for the PHP-SRC

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

docker-phpqa

Codacy Badge

Docker tools to easily create and run tests for the PHP-SRC. The intent of this library is to help any PHP developer to create PHPT tests for the language engine and its core extensions.

How to get it?

  1. You will need to have docker installed on your machine.

  2. Run our installer:

curl -s https://raw.githubusercontent.com/herdphp/docker-phpqa/master/bin/installer.sh | bash

Start PHPTesting!!!

How to use it?

  1. Write a PHPT test in any folder;
  2. Run the phpqa command passing as arguments the filepath (relative or full) and the PHP version to run the test (71, 70, 56, 55):
# without a version the test will run against PHP 7.1 codebase
phpqa phpt/examples/closure_061.phpt
# with a version the test will run against the specified version
phpqa phpt/examples/closure_061.phpt 56
# if you want you can pass `all` as second argument and the test will run against all versions
phpqa phpt/examples/closure_061.phpt all

Example execution

Note that when running the test suit there will be an output message reminding you to run make test. This is a standard message and you don't need to run it.

Build complete.
Don't forget to run 'make test'.

How to .PHPT

Build your first test

PHP versions available

  • PHP 5.5, 5.6, 7.0 and 7.1 are fully available and supported;
  • PHP 7.2 is about to work but since 7.2.0alpha2 is unable to be built we are still waiting the related PEAR bug to be fixed.

Contributing

If you notice any bug or typo, please feel free to create an issue and/or open a pull request with the fix.

PHPTestFest2017

This repository intent to facilitate participation and contribution in the PHP Test Festival. More information about it:

TODO

  • Add more PHP versions (PHP 7.2alpha and PHP 5.5 at least) Issue #5;
  • Put some effort to shrink the images, either using the Alpine version of them or any other strategy Issue #6;
  • Integrate this repository with CircleCi in order to have the docker images builds tested Issue #7;
  • Improve documentation, adding a session about how to write PHPT Issue #8;

Credits

LICENSE

Copyright (c) 2017 Bruno Ricardo Siqueira, Joao Paulo Vendramini Martins

This work is licensed under the terms of the MIT license.

About

Docker tools to easily create and run tests for the PHP-SRC

License:MIT License


Languages

Language:Shell 62.8%Language:PHP 37.2%