Пример #1
0
 public function testWillShowQuery()
 {
     $this->_em->persist(new DateTimeModel());
     $this->_em->flush();
     $this->assertSame(0, $this->tester->execute(array('command' => $this->command->getName(), 'dql' => 'SELECT e FROM ' . DateTimeModel::CLASSNAME . ' e', '--show-sql' => 'true')));
     $this->assertStringMatchesFormat('string%sSELECT %a', $this->tester->getDisplay());
 }
 /**
  * {@inheritDoc}
  */
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     DoctrineCommandHelper::setApplicationEntityManager($this->getApplication(), $input->getOption('em'));
     return parent::execute($input, $output);
 }