public function testHeartBeatException() { $this->setExpectedException('\\RuntimeException', 'Counld not connect to database'); $this->getDatabaseTester()->getConnection(); $config1 = new DoctrineConfig($this->connection); $this->assertEquals(0, $config1->getMachine()); $this->connection->close(); $config1->heartbeat(); }
protected function execute(InputInterface $input, OutputInterface $output) { $connection = $this->getConnection($input, $output); DoctrineConfig::createTable($connection, $input->getOption('table')); $output->writeln('<info>Success</info>'); }