You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Inspired by [Kris Wallsmith faster PHPUnit article](http://kriswallsmith.net/post/18029585104/faster-phpunit), we've created a [PHPUnit](http://phpunit.de) test listener that speeds up PHPUnit tests about 20% by freeing memory.
6
6
7
-
Setup and Configuration
8
-
-----------------------
9
-
Add the following to your `composer.json` file
10
-
```json
11
-
{
12
-
"require-dev": {
13
-
"mybuilder/phpunit-accelerator": "~1.0"
14
-
}
15
-
}
16
-
```
7
+
## Installation
8
+
9
+
To install this library, run the command below and you will get the latest version
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.
30
+
31
+
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
32
+
33
+
```php
34
+
<?php
35
+
36
+
use MyBuilder\PhpunitAccelerator\IgnoreTestPolicy;
37
+
38
+
class IgnoreLegacyTestPolicy implements IgnoreTestPolicy {
39
+
public function shouldIgnore(\ReflectionObject $testReflection) {
0 commit comments