/** * Clean up directory structure after each test */ public function tearDown() { if (is_dir($this->path)) { $this->rmdir($this->path); } parent::tearDown(); }
/** * Drop the test database after each test */ public function tearDown() { if (extension_loaded('mongo') && class_exists('MongoClient')) { $client = new MongoClient(); $client->selectDB($this->databaseName)->drop(); } parent::tearDown(); }
/** * 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(); }
/** * Reset PDO instance after each test */ public function tearDown() { $this->pdo = null; parent::tearDown(); }