public static function setUpBeforeClass() { parent::setUpBeforeClass(); if (!class_exists('\\Redis', false)) { self::$supported = false; return; } $redis = new Redis(); self::$supported = @$redis->connect('127.0.0.1', 6379); }
public static function setUpBeforeClass() { parent::setUpBeforeClass(); $connection = DriverManager::getConnection(array('driver' => 'pdo_sqlite', 'memory' => true)); $schemaManager = $connection->getSchemaManager(); $schema = $schemaManager->createSchema(); self::$dbalStore = new DbalStore($connection, 'store'); if (!$schema->hasTable(self::$dbalStore->getTableName())) { $schemaManager->createTable(self::$dbalStore->getTableForCreate()); } }
public static function setUpBeforeClass() { parent::setUpBeforeClass(); $client = new Client(); try { $client->connect(); $client->disconnect(); self::$supported = true; } catch (ConnectionException $e) { self::$supported = false; } }
public static function setUpBeforeClass() { parent::setUpBeforeClass(); if (!class_exists('MongoDB\\Client')) { self::$supported = false; return; } try { $client = new Client(); $client->listDatabases(); self::$supported = true; } catch (Exception $e) { self::$supported = false; } }
public static function setUpBeforeClass() { parent::setUpBeforeClass(); $client = new Riak(); self::$supported = $client->isAlive(); }