我想设置一个命令让我明确:缓存测试模式,然后做一个删除数据库,删除架构,添加方案,在测试模式下添加夹具。
class BaseCommand extends \Symfony\Component\Console\Command\Command {
//put your code here
protected function configure()
{
$this
->setName('mycommand:test')
->setDescription('Launch test')
;
}
protected function execute(InputInterface $input, OutputInterface $output)
{
$command_first_migration = $this->getApplication()->find('cache:clear');
$arguments_first_migration = array(
'command' => 'cache:clean',
'--env' => 'test'
);
$input_first_migration = new ArrayInput($arguments_first_migration);
try {
$returnCode = $command_first_migration->run($input_first_migration, $output);
} catch (\Doctrine\DBAL\Migrations\MigrationException $ex) {
echo "MigrationExcepion !!!! ";
}
}
}
但我有这个结果:
clearing the case for the dev environment with debug true
如何在开发环境中通过测试?
谢谢你