samburns/phpspec-multi-formatter

There is no license information available for the latest version (0.1.0) of this package.

A mutli-format outputter for PhpSpec

0.1.0 2017-08-01 13:46 UTC

This package is auto-updated.

Last update: 2024-11-24 05:13:27 UTC


README

A library that acts as a facade for two other PhpSpec formatters. Primarily intended for use on Continuous Integration servers. Allows you to use the 'dot formatter' and output a JUnit XML file in a single test run.

State of Development

In alpha. Sort of works. Development/testing ongoing. Contributions welcome.

Use

Requires PhpSpec 4 and PHP 7.

composer require --dev samburns/phpspec-multi-formatter 

In your phpspec.yml file:

extensions:
    "SamBurns\\PhpSpecMultiFormatter\\Extension":
        file: 'spec/junit.xml'

Running PhpSpec with the multi-formatter:

./vendor/bin/phpspec run --format=multiformatter

Development

Clone the repository and run Composer.

Run the following command from the project root:

./vendor/bin/phpspec r -c test/sampleapp/phpspec.yml --format=multiformatter

It should create a file called ./test/sampleapp/spec/junit-output/junit.xml and do 'dot formatter' output at the same time. If it does, then you haven't broken anything.