Download the PHP package atoum/blackfire-extension without Composer
On this page you can find all versions of the php package atoum/blackfire-extension. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download atoum/blackfire-extension
More information about atoum/blackfire-extension
Files in atoum/blackfire-extension
Package blackfire-extension
Short Description Write your Blackfire test suites with atoum
License MIT
Homepage http://www.atoum.org
Informations about the package blackfire-extension
atoum/blackfire-extension
blackfire-extension allows you to use blackfire assertions inside atoum.
The Blackfire PHP-SDK has a built-in PHPUnit integration. This extension does the same, but for atoum.
Example
Let's take this example.
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 :
Install it
Install extension using composer:
Enable and configure the extension using atoum configuration file:
Other examples
Define custom metrics
You can learn more about this on the custom metric's section of Blackfire documentation.
Pass your own profile configuration
You can learn more about this on the profile basic configurable's section of Blackfire documentation.
Pass a custom client
You can either pass the blackfire client in the .atoum.php
config file (when loading the extension). In that case the client will be used in all the blackfire assertions. You also can load/overload it in the blackfire
assert. For example:
Test filtering
To avoid running the test if the blackfire extension is not loaded, you can use the @extensions
annotation.
You can add this annotation on both the test method or the test class.
Then, when running the test, the classes/methods with this annotation will be skipped if the extension is not present/loaded:
You also can use atoum's tags and the ruler extension to only run the blackfire tests.
Links
Licence
blackfire-extension is released under the MIT License. See the bundled LICENSE file for details.