2017 © Pedro Peláez
 

library booster

Make your tests run faster

image

driebit/booster

Make your tests run faster

  • Monday, February 2, 2015
  • by ddeboer
  • Repository
  • 18 Watchers
  • 2 Stars
  • 2,444 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 1 % Grown

The README.md

Booster

Build Status, (*1)

Introduction

Booster is a set of tools that will make your PHP and/or Symfony tests run faster and use less memory., (*2)

Installation

The recommended way to install this library is through Composer:, (*3)

$ composer require driebit/booster

This command requires you to have Composer installed globally, as explained in the installation chapter of the Composer documentation., (*4)

Usage

Null properties on tear down

Nulling class properties on test tear down helps reduce memory footprint and test runtime. For instance when using PHPUnit:, (*5)

use Driebit\Booster\Cleaner;

class MyTest extends \PHPUnit_Framework_TestCase
{
    // tests here...

    protected function tearDown()
    {
        // tear down actions here...

        $cleaner = new Cleaner();
        $cleaner->nullProperties($this);
    }
}

Or using the trait:, (*6)

use Driebit\Booster\Phpunit\NullOnTearDownTrait;

class MyTest extends \PHPUnit_Framework_TestCase
{
    use NullOnTearDownTrait;
}

Disable debug mode after first kernel initialization

When running functional Symfony tests, you will probably be creating the service container many times. If debug mode is enabled, Symfony will check whether any resources have changed during each container initialization. By disabling debug mode, you wil be using a cached container in your tests., (*7)

Use the trait from your AppKernel:, (*8)

```php use Driebit\Booster\Symfony\NoDebugTrait;, (*9)

class AppKernel extends Kernel { use NoDebugTrait;, (*10)

// ...

}, (*11)

The Versions

02/02 2015

dev-master

9999999-dev

Make your tests run faster

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

test phpunit symfony

02/02 2015

0.1.2

0.1.2.0

Make your tests run faster

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

test phpunit symfony

01/02 2015

0.1.1

0.1.1.0

Make your tests run faster

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

test phpunit symfony

01/02 2015

0.1.0

0.1.0.0

Make your tests run faster

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

test phpunit symfony