2017 © Pedro Peláez
 

library phpunit-accelerator

PHPUnit accelerator

image

mybuilder/phpunit-accelerator

PHPUnit accelerator

  • Friday, June 8, 2018
  • by mybuilder
  • Repository
  • 14 Watchers
  • 124 Stars
  • 1,010,844 Installations
  • PHP
  • 47 Dependents
  • 0 Suggesters
  • 12 Forks
  • 5 Open issues
  • 8 Versions
  • 12 % 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

08/06 2018

dev-prepare-3.0

dev-prepare-3.0

PHPUnit accelerator

  Sources   Download

MIT

The Requires

 

phpunit property memory free fast accelerator

08/06 2018

dev-master

9999999-dev

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