/** * Helper function that returns a database object for the prod environment. * * @return \Acquia\Cloud\Database\DatabaseService */ public function getProductionDatabaseService() { $environment = new CloudEnvironment(); $environment->setEnvironment(Environment::PRODUCTION)->setCredentialsFilepath(__DIR__ . '/../Environment/json/creds.json'); $service = new DatabaseService(); return $service->setCloudEnvironment($environment)->setResolver(new TestResolver()); }
/** * @expectedException \OutOfBoundsException */ public function testNoServers() { $environment = new CloudEnvironment(); $environment->setEnvironment(Environment::PRODUCTION)->setCredentialsFilepath(__DIR__ . '/json/no-servers.json'); $service = new MemcacheService(); $service->setCloudEnvironment($environment); $service->credentials(); }