2017 © Pedro Peláez
 

library php-test

CI Helper scripts

image

peterrehm/php-test

CI Helper scripts

  • Friday, June 15, 2018
  • by peterrehm
  • Repository
  • 1 Watchers
  • 0 Stars
  • 21 Installations
  • Shell
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 6 Versions
  • 31 % Grown

The README.md

php-test

This library aims to ease the test setup of standard PHP projects using PHPUnit and Behat using a phing build file., (*1)

Setup

  • Include this library using composer
    composer require peterrehm/php-test --dev
  • Copy the sample build file into your project root
   (project-root) $ cp vendor/peterrehm/php-test/build_local.xml build.xml
  • Set up the test scripts

Create bin/run_tests.sh and bin/run_static_analysis.sh. The simplest version would be as follows:, (*2)

# bin/run_static_analysis.sh
#!/bin/bash
vendor/peterrehm/php-test/bin/run_static_analysis.sh

# bin/run_tests.sh
#!/bin/bash
vendor/peterrehm/php-test/bin/run_tests.sh coverage no-behat

Of course you could just copy from those files and add whatever logic you need to it. As it is common to need custom test preparations you can pass a third parameter to run tests with a custom script name., (*3)

If no script is provided a simple composer install will be executed. If you provide a custom script make sure to manually run the composer install., (*4)

# bin/run_tests.sh
#!/bin/bash
vendor/peterrehm/php-test/bin/run_tests.sh coverage no-behat /my/custom/script.sh

This command will be executed prior to the test execution., (*5)

The Versions

15/06 2018

dev-master

9999999-dev

CI Helper scripts

  Sources   Download

MIT

The Requires

 

15/06 2018
08/05 2017
09/02 2017
09/02 2017
09/02 2017