1. Go to this page and download the library: Download atoum/blackfire-extension library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
atoum / blackfire-extension example snippets
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();
})
;
}
}