public function tearDown() { parent::tearDown(); if ($this->emptySqlDumpFile) { unlink($this->emptySqlDumpFile); } }
public function setUp() { parent::setUp(); Translator::registerDomain('icingatest', BaseTestCase::$testDir . '/res/locale'); }
public function tearDown() { parent::tearDown(); Mockery::close(); // Necessary because some tests run in a separate process }
public function tearDown() { parent::tearDown(); system('rm -rf ' . $this->baseDir); }
public function tearDown() { parent::tearDown(); Hook::clean(); }
public function tearDown() { parent::tearDown(); unlink($this->target); }
} /** * Setup provider for testcase * * @param string|DbConnection|null $resource */ public function setupDbProvider($resource) { if (!$resource instanceof DbConnection) { if (is_string($resource)) { $this->markTestSkipped('Could not initialize provider: ' . $resource); } else { $this->markTestSkipped('Could not initialize provider'); } return; } $adapter = $resource->getConnection(); try { $adapter->getConnection(); } catch (Exception $e) { $this->markTestSkipped('Could not connect to provider: ' . $e->getMessage()); } $tables = $adapter->listTables(); foreach ($tables as $table) { $adapter->exec('DROP TABLE ' . $table . ';'); } } } BaseTestCase::setupTimezone(); BaseTestCase::setupDirectories(); }
/** * Reset config dir */ public function tearDown() { parent::tearDown(); Config::$configDir = $this->oldConfigDir; }
public function setUp() { parent::setUp(); $this->sampleData = array((object) array('host' => 'localhost', 'problem' => '1', 'service' => 'ping', 'state' => '2', 'handled' => '1'), (object) array('host' => 'localhost', 'problem' => '1', 'service' => 'www.icinga.org', 'state' => '0', 'handled' => '0'), (object) array('host' => 'localhost', 'problem' => '1', 'service' => 'www.icinga.org', 'state' => '1', 'handled' => '0')); }
public function tearDown() { parent::tearDown(); unlink($this->tempFile); unlink($this->tempFile2); }