public function it_should_throw_if_pdo_connection_fails()
{
$application = new Application();
/** @var \tad\WPBrowser\Services\Db\MySQLDumpFactoryInterface $factory */
$factory = $this->prophesize('\\tad\\WPBrowser\\Services\\Db\\MySQLDumpFactoryInterface');
$factory->makeDump(Argument::type('string'), Argument::type('string'), Argument::type('string'), Argument::type('string'))->willThrow(new \PDOException());
$application->add(new DbSnapshot(null, $factory->reveal()));
$command = $application->find('db:snapshot');
$commandTester = new CommandTester($command);
$this->expectException('\\Symfony\\Component\\Console\\Exception\\RuntimeException');
$commandTester->execute(['command' => $command->getName(), 'name' => 'db', 'snapshot' => 'someSnapshot']);
}