2017 © Pedro Peláez
 

library phpunit-accelerator

PHPUnit accelerator

image

gulaandrij/phpunit-accelerator

PHPUnit accelerator

  • Thursday, May 24, 2018
  • by gulaandrij
  • Repository
  • 1 Watchers
  • 1 Stars
  • 203 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 11 Forks
  • 0 Open issues
  • 9 Versions
  • 1094 % Grown

The README.md

PHPUnit Accelerator

Build Status, (*1)

Inspired by Kris Wallsmith faster PHPUnit article, we've created a PHPUnit test listener that speeds up PHPUnit tests about 20% by freeing memory., (*2)

Installation

To install this library, run the command below and you will get the latest version, (*3)

``` bash composer require mybuilder/phpunit-accelerator --dev, (*4)


## Usage Just add to your `phpunit.xml` configuration ```xml <phpunit> <listeners> <listener class="\MyBuilder\PhpunitAccelerator\TestListener"/> </listeners> </phpunit>

Ignoring Tests

Sometimes it is necessary to ignore specific tests, where freeing their properties is undesired. For this use case, you have the ability to extend the behaviour of the listener by implementing the IgnoreTestPolicy interface., (*5)

As an example, if we hypothetically wanted to ignore all tests which include "Legacy" in their test filename, we could create a custom ignore policy as follows, (*6)

<?php

use MyBuilder\PhpunitAccelerator\IgnoreTestPolicy;

class IgnoreLegacyTestPolicy implements IgnoreTestPolicy {
    public function shouldIgnore(\ReflectionObject $testReflection) {
        return strpos($testReflection->getFilename(), 'Legacy') !== false;
    }
}

And pass it to the constructor of our test listener in phpunit.xml configuration, (*7)

<phpunit>
    <listeners>
        <listener class="\MyBuilder\PhpunitAccelerator\TestListener">
            <arguments>
                <object class="\IgnoreLegacyTestPolicy"/>
            </arguments>
        </listener>
    </listeners>
</phpunit>

Created by MyBuilder - Check out our blog for more insight into this and other open-source projects we release., (*8)

The Versions

24/05 2018

dev-master

9999999-dev

PHPUnit accelerator

  Sources   Download

MIT

The Requires

 

phpunit property memory free fast accelerator

24/05 2018

3.0.1

3.0.1.0

PHPUnit accelerator

  Sources   Download

MIT

The Requires

 

phpunit property memory free fast accelerator

23/05 2018

3.0.0

3.0.0.0

PHPUnit accelerator

  Sources   Download

MIT

The Requires

 

phpunit property memory free fast accelerator

21/06 2017

2.0.0

2.0.0.0

PHPUnit accelerator

  Sources   Download

MIT

The Requires

 

phpunit property memory free fast accelerator

15/11 2016

1.2.0

1.2.0.0

PHPUnit accelerator

  Sources   Download

MIT

The Requires

 

phpunit property memory free fast accelerator

29/12 2015

v1.1.1

1.1.1.0

PHPUnit accelerator

  Sources   Download

MIT

The Requires

 

phpunit property memory free fast accelerator

17/01 2015

v1.1.0

1.1.0.0

PHPUnit accelerator

  Sources   Download

MIT

The Requires

 

phpunit property memory free fast accelerator

07/04 2014

v1.0.1

1.0.1.0

PHPUnit accelerator

  Sources   Download

MIT

The Requires

 

phpunit property memory free fast accelerator

13/03 2014

v1.0.0

1.0.0.0

PHPUnit accelerator

  Sources   Download

MIT

The Requires

 

phpunit property memory free fast accelerator