Skip to content

Instantly share code, notes, and snippets.

@B-Galati
Last active May 7, 2016 15:34
Show Gist options
  • Select an option

  • Save B-Galati/d0db620fcc02d54dbfbc to your computer and use it in GitHub Desktop.

Select an option

Save B-Galati/d0db620fcc02d54dbfbc to your computer and use it in GitHub Desktop.
Example of atoum configuration time
<?php
use mageekguy\atoum;
use mageekguy\atoum\report\fields\runner\failures\execute;
$cloverWriter = new atoum\writers\file('builds/tests/atoum.coverage.xml');
$cloverReport = new atoum\reports\asynchronous\clover();
$cloverReport->addWriter($cloverWriter);
$xunitWriter = new atoum\writers\file('builds/tests/atoum.xunit.xml');
$xunitReport = new atoum\reports\asynchronous\xunit();
$xunitReport->addWriter($xunitWriter);
$images = __DIR__.'/vendor/atoum/atoum/resources/images/logo/';
$notifier = new \mageekguy\atoum\report\fields\runner\result\notifier\image\libnotify();
$notifier
->setSuccessImage($images . DIRECTORY_SEPARATOR . 'success.png')
->setFailureImage($images . DIRECTORY_SEPARATOR . 'failure.png')
;
$stdOutWriter = new atoum\writers\std\out();
$cliReport = new atoum\reports\realtime\phing();
$cliReport->addWriter($stdOutWriter);
$cliReport
->addField(new execute\phpstorm('/opt/phpstorm9/bin/phpstorm.sh'));
->addField($notifier, [atoum\runner::runStop])
;
$runner
->addReport($cliReport)
->addReport($xunitReport)
->addReport($cloverReport)
;

Use debugging in atoum tests :

atoum tests/units/classes/adapter.php --xc "idekey=phpstorm"

Use debugging in cli :

XDEBUG_CONFIG="idekey=phpstorm" app/console test
[xdebug]
zend_extension="/usr/local/lib/php/extensions/no-debug-non-zts-20121212/xdebug.so"
xdebug.profiler_enable=Off
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_port=9000
xdebug.remote_connect_back=1
xdebug.idekey=phpstorm
xdebug.remote_log = /tmp/xdebug.log
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment