私はいくつかの単体テストを書いていますが、テストデータベースを作成するために単体テストでいくつかのコマンドを呼び出す必要があります。ただし、コマンドを呼び出すと、通知が画面にダンプされます。これを止める方法はありますか?--quietを実行しようとしましたが、通知が抑制されません。
$this->runConsole("doctrine:mongodb:schema:create", array("-q"=> null,"--env" => "test"));
...。
protected function runConsole($command, Array $options = array())
{
$options = array_merge($options, array('command' => $command));
return $this->_application->run(new \Symfony\Component\Console\Input\ArrayInput($options));
}
私が受け取っている通知:
[2013-02-07 16:24:43] doctrine.INFO: MongoDB query: {"deleteIndexes":true,"db":"xxxxxx","collection":"xxxxxx} [] []
[2013-02-07 16:24:43] doctrine.INFO: MongoDB query: {"deleteIndexes":true,"db":"xxxxxx","collection":"xxxxxx"} [] []
[2013-02-07 16:24:43] doctrine.INFO: MongoDB query: {"deleteIndexes":true,"db":"xxxxxx","collection":"xxxxxx"} [] []