Skip to content
This repository has been archived by the owner on Apr 29, 2022. It is now read-only.

Commit

Permalink
Update test runner to use new config handling.
Browse files Browse the repository at this point in the history
  • Loading branch information
dersam committed Apr 1, 2016
1 parent db96b43 commit 9b41250
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/LinusShops/Prophet/Commands/Run.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
}

/** @var Module $module */
foreach ($config->getModuleList() as $module) {
foreach ($config->getModules() as $module) {
if ($this->checkIfRequested($modulesRequested, $module, $output)) {
$modulePath = $module->getPath();
$magentoPath = $input->getOption('path');
Expand All @@ -82,7 +82,8 @@ protected function execute(InputInterface $input, OutputInterface $output)
private function loadClasses($modulesRequested, Config $config, InputInterface $input, OutputInterface $output)
{
$loaded = true;
if ($config->hasModules()) {

if (!$config->hasModules()) {
$output->writeln('<error>No modules found in prophet.json.</error>');
$loaded = false;
} else {
Expand Down
5 changes: 5 additions & 0 deletions src/LinusShops/Prophet/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,9 @@ public function getModules()
{
return $this->modules;
}

public function hasModules()
{
return count($this->modules) > 0;
}
}

0 comments on commit 9b41250

Please sign in to comment.