From 9bfeaf9cc0c88e16d5b764475d8c89790ad88ae4 Mon Sep 17 00:00:00 2001 From: Vincent Jousse Date: Thu, 21 Nov 2013 18:49:06 +0100 Subject: [PATCH] Add Atoum console command --- src/Poche/Command/UnitTestsCommand.php | 8 +++++++- tests/bootstrap.php | 4 ++++ 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 tests/bootstrap.php diff --git a/src/Poche/Command/UnitTestsCommand.php b/src/Poche/Command/UnitTestsCommand.php index 28daba2..81fa809 100644 --- a/src/Poche/Command/UnitTestsCommand.php +++ b/src/Poche/Command/UnitTestsCommand.php @@ -17,12 +17,18 @@ class UnitTestsCommand extends BaseCommand protected function configure() { $this - ->setName('tests:units') + ->setName('tests:unit') ->setDescription('Launches units tests with Atoum') ; } protected function execute(InputInterface $input, OutputInterface $output) { + $atoum = $this->getProjectDirectory().'/vendor/bin/atoum'; + $unitTests = $this->getProjectDirectory().'/tests'; + + passthru(sprintf('%s -d %s -ft', $atoum, $unitTests), $status); + + return $status; } } diff --git a/tests/bootstrap.php b/tests/bootstrap.php new file mode 100644 index 0000000..ffa5070 --- /dev/null +++ b/tests/bootstrap.php @@ -0,0 +1,4 @@ +