2017 © Pedro Peláez
 

library composer-multitest

Composer script to run a Composer test or spec script against all versions managed by PHPBrew or phpenv.

image

stolt/composer-multitest

Composer script to run a Composer test or spec script against all versions managed by PHPBrew or phpenv.

  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 5 Versions
  • 0 % Grown

The README.md

composer-multitest

Build Status Version PHP Version composer.lock available, (*1)

composer-multitest is a Composer script that runs a test or spec Composer script against multiple PHP versions managed by PHPBrew or phpenv. Kind of a local Travis CI., (*2)

Assumptions

As composer-multitest utilizes phpenv and PHPBrew it's assumed that at least one of them is installed and manages several PHP versions. It will first look for phpenv managed versions and when this fails it will subsequently look for PHPBrew managed ones., (*3)

The versions to test against are read from the local Travis CI configuration so it's assumed that one is present. Versions present in the Travis CI configuration not having a phpenv or PHPBrew managed version will fail the script when not disabled via the --skip-missing-versions option., (*4)

The Composer script composer-multitest will run MUST be named test or spec and it can be defined in a Composer script namespace like library:test|spec., (*5)

Installation

The Composer script should be installed as a development dependency through Composer., (*6)

``` bash composer require --dev stolt/composer-multitest, (*7)


## Usage Once installed add the Composer script to the existing `composer.json` and use it afterwards via `composer multitest`. ``` json { "scripts": { "multitest": "Stolt\\Composer\\Multitest::run" }, }

If you want to disable the prerequisite that the tests or specs have to be run against all PHP versions defined in the Travis CI configuration use the --skip-missing-versions option like shown next., (*8)

``` json { "scripts": { "multitest-run": "Stolt\Composer\Multitest::run", "multitest": "composer run-script multitest-run -- --skip-missing-versions" },, (*9)


## Example output The follow console output shows an example multitest run against two PHP versions. ``` bash ❯ composer multitest > Stolt\Composer\Multitest::run >> Switching to 'php-7.0.4'. >> Running 'composer lpv:test'. PHPUnit 5.6.1 by Sebastian Bergmann and contributors. ................................................................. 65 / 96 ( 67%) ............................... 96 / 96 (100%) Time: 591 ms, Memory: 12.25MB OK (96 tests, 150 assertions) >> Switching to 'php-5.6.19'. >> Running 'composer lpv:test'. PHPUnit 5.6.1 by Sebastian Bergmann and contributors. ................................................................. 65 / 96 ( 67%) ............................... 96 / 96 (100%) Time: 591 ms, Memory: 12.25MB OK (96 tests, 150 assertions) ❯ echo $? 0 ❯

Running tests

bash composer cm:test, (*10)

License

This Composer script is licensed under the MIT license. Please see LICENSE for more details., (*11)

Changelog

Please see CHANGELOG for more details., (*12)

Contributing

Please see CONTRIBUTING for more details., (*13)

The Versions

08/05 2017

dev-master

9999999-dev https://github.com/raphaelstolt/composer-phpbrew-multitest

Composer script to run a Composer test or spec script against all versions managed by PHPBrew or phpenv.

  Sources   Download

MIT

The Requires

 

The Development Requires

phpenv composer script phpbrew multitest local ci

03/11 2016

v1.1.0

1.1.0.0 https://github.com/raphaelstolt/composer-phpbrew-multitest

Composer script to run a Composer test or spec script against all versions managed by PHPBrew or phpenv.

  Sources   Download

MIT

The Requires

 

The Development Requires

phpenv composer script phpbrew multitest local ci

03/11 2016

v1.0.2

1.0.2.0 https://github.com/raphaelstolt/composer-phpbrew-multitest

Composer script to run a Composer test or spec script against all versions managed by PHPBrew or phpenv.

  Sources   Download

MIT

The Requires

 

The Development Requires

phpenv composer script phpbrew multitest local ci

24/10 2016

v1.0.1

1.0.1.0 https://github.com/raphaelstolt/composer-phpbrew-multitest

Composer script to run a Composer test or spec script against all versions managed by PHPBrew or phpenv.

  Sources   Download

MIT

The Requires

 

The Development Requires

phpenv composer script phpbrew multitest local ci

20/10 2016

v1.0.0

1.0.0.0 https://github.com/raphaelstolt/composer-phpbrew-multitest

Composer script to run a Composer test or spec script against all versions managed by PHPBrew or phpenv.

  Sources   Download

MIT

The Requires

 

The Development Requires

phpenv composer script phpbrew multitest local ci