Skip to content

Commit

Permalink
Fix: update tests to work with atoum 2.0+
Browse files Browse the repository at this point in the history
  • Loading branch information
mikaelrandy committed Oct 7, 2015
1 parent 035666b commit b6fa1fc
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 31 deletions.
26 changes: 0 additions & 26 deletions .atoum.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,3 @@

$runner->disableCodeCoverage();
$runner->addTestsFromDirectory(__DIR__ . '/tests/units');

## Notifier (growlnotify)
$images = __DIR__ . '/vendor/atoum/atoum/resources/images/logo';

$report = $script->AddDefaultReport();

if(syslibExist('growlnotify') )
{
$notifier = new \mageekguy\atoum\report\fields\runner\result\notifier\image\growl();
$notifier
->setSuccessImage($images . DIRECTORY_SEPARATOR . 'success.png')
->setFailureImage($images . DIRECTORY_SEPARATOR . 'failure.png')
;
$report->addField($notifier, array(atoum\runner::runStop));
}

/**
* Return true if library is available on system
*
* @param string $libName
* @return boolean
*/
function syslibExist($libName)
{
return !is_null(shell_exec(sprintf('command -v %s 2>/dev/null', $libName)));
}
6 changes: 1 addition & 5 deletions bin/tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,4 @@

php app/console db:install --env=test --load-fixtures

<<<<<<< Updated upstream
./vendor/bin/atoum
=======
./vendor/bin/atoum --test-all --debug
>>>>>>> Stashed changes
./bin/atoum
10 changes: 10 additions & 0 deletions src/Aperophp/Test/Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,16 @@

class Test extends atoum\test
{
/**
* @var \Silex\Application
*/
protected $app;

/**
* Initialize application
*
* @param $method Method name
*/
public function beforeTestMethod($method)
{
$this->app = require __DIR__.'/../../../app/app.php';
Expand Down

0 comments on commit b6fa1fc

Please sign in to comment.