PHPackages                             atoum/blackfire-extension - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Testing &amp; Quality](/categories/testing)
4. /
5. atoum/blackfire-extension

ActiveLibrary[Testing &amp; Quality](/categories/testing)

atoum/blackfire-extension
=========================

Write your Blackfire test suites with atoum

2.1.0(10y ago)7247MITPHP

Since Dec 5Pushed 9y ago5 watchersCompare

[ Source](https://github.com/atoum/blackfire-extension)[ Packagist](https://packagist.org/packages/atoum/blackfire-extension)[ Docs](http://www.atoum.org)[ RSS](/packages/atoum-blackfire-extension/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependencies (2)Versions (6)Used By (0)

atoum/blackfire-extension [![Build Status](https://camo.githubusercontent.com/4ffc23bf9d4095cb084cc6ff547e8e1a8fd3deb6825f19b5ea9dd94334efc437/68747470733a2f2f7472617669732d63692e6f72672f61746f756d2f626c61636b666972652d657874656e73696f6e2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/atoum/blackfire-extension)
====================================================================================================================================================================================================================================================================================================================================

[](#atoumblackfire-extension-)

blackfire-extension allows you to use blackfire assertions inside [atoum](https://github.com/atoum/atoum).

The Blackfire PHP-SDK has a built-in [PHPUnit integration](https://blackfire.io/docs/integrations/phpunit). This extension does the same, but for atoum.

Example
-------

[](#example)

Let's take this example.

```
namespace Tests\Units;

use Example as TestedClass;

use atoum;

class Example extends atoum
{
    public function testExemple()
    {
        $this
            ->blackfire
                ->assert('main.wall_time < 2s', "Temps d'execution")
                ->profile(function() {
                    sleep(4); //just to make the test fail

                    //some code to profile
                    // ...

                    //you also can run atoum assertions inside this callable
                    //but beware, atoum's logic will also be profiled.
                    $this->boolean(true)->isTrue();
                })
        ;
    }
}
```

When running this test, the callback will be automatically instrumented and execute on Blackfire the assertions defined by the Configuration. If they fail, an atoum error will be displayed.The above example will have this output :

[![Instrumentation result](doc/screenshot.png)](doc/screenshot.png)

Install it
----------

[](#install-it)

Install extension using [composer](https://getcomposer.org):

```
composer require --dev atoum/blackfire-extension

```

Enable and configure the extension using atoum configuration file:

```
