エラーを前置きにした

Co-authored-by: hina <hina@hinaloe.net>
This commit is contained in:
eai04191 2019-07-03 17:03:30 +09:00
parent 0284827fcf
commit dea1eeabd6

View File

@ -40,7 +40,10 @@ class UpdateFixture extends Command
$resolver_base_path = __DIR__ . '/../../../tests/Unit/MetadataResolver/'; $resolver_base_path = __DIR__ . '/../../../tests/Unit/MetadataResolver/';
$test_file_path = $resolver_base_path . $this->argument('resolver') . 'ResolverTest.php'; $test_file_path = $resolver_base_path . $this->argument('resolver') . 'ResolverTest.php';
if (file_exists($test_file_path)) { if (!file_exists($test_file_path)) {
throw new \RuntimeException($this->argument('resolver') . 'ResolverTest.php is not found.');
}
$this->info($this->argument('resolver') . 'ResolverTest.php is found.'); $this->info($this->argument('resolver') . 'ResolverTest.php is found.');
$test_file = file_get_contents($test_file_path); $test_file = file_get_contents($test_file_path);
@ -75,8 +78,5 @@ class UpdateFixture extends Command
$progress->finish(); $progress->finish();
$this->output->newLine(); $this->output->newLine();
$this->info('Update Complete!'); $this->info('Update Complete!');
} else {
$this->error($this->argument('resolver') . 'ResolverTest.php is not found.');
}
} }
} }