From b6fa1fc508870c9f7bbcd4f96581440eff54d8bd Mon Sep 17 00:00:00 2001 From: Mikael Randy Date: Sat, 29 Aug 2015 14:45:00 +0200 Subject: [PATCH] Fix: update tests to work with atoum 2.0+ --- .atoum.php | 26 -------------------------- bin/tests.sh | 6 +----- src/Aperophp/Test/Test.php | 10 ++++++++++ 3 files changed, 11 insertions(+), 31 deletions(-) diff --git a/.atoum.php b/.atoum.php index 3470bed..ce95bfe 100644 --- a/.atoum.php +++ b/.atoum.php @@ -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))); -} diff --git a/bin/tests.sh b/bin/tests.sh index 531c411..601c4de 100755 --- a/bin/tests.sh +++ b/bin/tests.sh @@ -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 diff --git a/src/Aperophp/Test/Test.php b/src/Aperophp/Test/Test.php index f4c4964..193fec7 100644 --- a/src/Aperophp/Test/Test.php +++ b/src/Aperophp/Test/Test.php @@ -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';