Example #1
0
 /**
  * Clean up directory structure after each test
  */
 public function tearDown()
 {
     if (is_dir($this->path)) {
         $this->rmdir($this->path);
     }
     parent::tearDown();
 }
Example #2
0
 /**
  * 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();
 }
Example #3
0
File: S3Test.php Project: imbo/imbo
 /**
  * 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();
 }
Example #4
0
 /**
  * Reset PDO instance after each test
  */
 public function tearDown()
 {
     $this->pdo = null;
     parent::tearDown();
 }