Skip to content

Commit

Permalink
- No more use --test-all since it's deprecated.
Browse files Browse the repository at this point in the history
- php notice throwed when exception on array_map instead of exception.
  • Loading branch information
stephpy committed Sep 13, 2013
1 parent b2ac62a commit a7607cd
Showing 1 changed file with 10 additions and 15 deletions.
25 changes: 10 additions & 15 deletions Command/AtoumCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ protected function execute(InputInterface $input, OutputInterface $output)
$bundles = $input->getArgument('bundles');
if (count($bundles) > 0) {
$self = $this;
$bundles = array_map(function($v) use ($self) {
return $self->extractBundleConfigurationFromKernel($v);
}, $bundles);
foreach ($bundles as $k => $bundleName) {
$bundles[$k] = $this->extractBundleConfigurationFromKernel($bundleName);
}
} else {
$bundles = $this->getContainer()->get('atoum.configuration.bundle.container')->all();
}
Expand All @@ -84,21 +84,16 @@ protected function execute(InputInterface $input, OutputInterface $output)
}
}

if (count($runner->getTestAllDirectories()) == 0) {
$output->writeln('<error>There is no test to launch.</error>');
} else {
$defaultBootstrap = sprintf('%s/autoload.php', $this->getApplication()->getKernel()->getRootDir());
$bootstrap = $input->getOption('bootstrap-file') ?: $defaultBootstrap;
$defaultBootstrap = sprintf('%s/autoload.php', $this->getApplication()->getKernel()->getRootDir());
$bootstrap = $input->getOption('bootstrap-file') ?: $defaultBootstrap;

$this->setAtoumArgument('--test-all');
$this->setAtoumArgument('--bootstrap-file', $bootstrap);
$this->setAtoumArgument('--bootstrap-file', $bootstrap);

if ($input->getOption('no-code-coverage')) {
$this->setAtoumArgument('-ncc');
}

$runner->run($this->getAtoumArguments());
if ($input->getOption('no-code-coverage')) {
$this->setAtoumArgument('-ncc');
}

$runner->run($this->getAtoumArguments());
}

/**
Expand Down

0 comments on commit a7607cd

Please sign in to comment.