public function setUp() { if (!class_exists('MongoClient')) { $this->markTestSkipped('pecl/mongo >= 1.3.0 is required to run this test'); } $client = new MongoClient(); $client->selectDB($this->testDbName)->drop(); parent::setUp(); }
public function setUp() { $this->path = sys_get_temp_dir() . DIRECTORY_SEPARATOR . 'imboFilesystemIntegrationTest'; if (is_dir($this->path)) { $this->rmdir($this->path); } mkdir($this->path); parent::setUp(); }
/** * Make sure we have the correct config available */ public function setUp() { foreach (['AWS_S3_KEY', 'AWS_S3_SECRET', 'AWS_S3_BUCKET'] as $key) { if (empty($GLOBALS[$key])) { $this->markTestSkipped('This test needs the ' . $key . ' value to be set in phpunit.xml'); } } $client = S3Client::factory(['key' => $GLOBALS['AWS_S3_KEY'], 'secret' => $GLOBALS['AWS_S3_SECRET']]); $client->clearBucket($GLOBALS['AWS_S3_BUCKET']); parent::setUp(); }
public function setUp() { if (!extension_loaded('PDO')) { $this->markTestSkipped('PDO is required to run this test'); } if (!extension_loaded('pdo_sqlite')) { $this->markTestSkipped('pdo_sqlite is required to run this test'); } if (!class_exists('Doctrine\\DBAL\\DriverManager')) { $this->markTestSkipped('Doctrine is required to run this test'); } // Create tmp tables $this->pdo = new PDO('sqlite::memory:'); $this->pdo->query("\n CREATE TABLE storage_images (\n publicKey TEXT NOT NULL,\n imageIdentifier TEXT NOT NULL,\n data BLOB NOT NULL,\n updated INTEGER NOT NULL,\n PRIMARY KEY (publicKey,imageIdentifier)\n )\n "); parent::setUp(); }