/** * Clean up afterwards. * * @return void * * @since 12.3 */ public static function tearDownAfterClass() { // Clean up files @unlink(__DIR__ . '/data/web-keychain.dat'); @unlink(__DIR__ . '/data/web-passphrase.dat'); parent::tearDownAfterClass(); }
/** * {@inheritdoc} */ public static function tearDownAfterClass() { parent::tearDownAfterClass(); foreach (self::$filesToRemove as $file) { unlink($file); } }
public static function tearDownAfterClass() { if (self::$isGdInstalled) { self::$testDir->remove(); } parent::tearDownAfterClass(); }
/** * Delete the workspace if it exists * * @return void */ public static function tearDownAfterClass() { parent::tearDownAfterClass(); if (self::$workspacePath) { self::cmd('rm -rf ?', null, self::$workspacePath); self::$workspacePath = null; } }
public static function tearDownAfterClass() { parent::tearDownAfterClass(); //restore the StableUpdate log to previous contents if (isset(self::$logContents)) { file_put_contents(__DIR__ . '/../../Includes/StableUpdate.log', self::$logContents); } }
public static function tearDownAfterClass() { parent::tearDownAfterClass(); $fs = new Filesystem(); foreach (self::$cleanup as $folder) { $fs->remove($folder); } }
public static function tearDownAfterClass() { if (is_array(self::$comparators)) { array_map(array(Factory::getInstance(), 'unregister'), self::$comparators); self::$comparators = null; } parent::tearDownAfterClass(); }
/** * 清理测试环境 */ public static function tearDownAfterClass() { parent::tearDownAfterClass(); AppHelper::Instance()->config("APP_CTRL", 'TestControllers1/'); $CPath = APPPATH . AppHelper::Instance()->config("APP_CTRL"); rename($CPath, dirname(__FILE__) . "/TestControllers1/"); unlink(APPPATH . "/temp/testForCmd.text"); }
public static function tearDownAfterClass() { parent::tearDownAfterClass(); $cacheDir = __DIR__ . "/../../cache/"; foreach (glob($cacheDir . "*") as $cacheFile) { unlink($cacheFile); } }
public static function tearDownAfterClass() { parent::tearDownAfterClass(); ControlResolver::setAppPath(APPPATH); AppHelper::Instance()->config("APP_CTRL", self::$_APP_CTRL); AppHelper::Instance()->config("CMD_FILTER", ''); //恢复默认 }
public static function tearDownAfterClass() { parent::tearDownAfterClass(); $fs = new Filesystem(); //cleanup if ($fs->exists(self::$nonceDir)) { $fs->remove(self::$nonceDir); } }
/** * Overrides the parent tearDown method. * * @return void * * @see PHPUnit_Framework_TestCase::tearDownAfterClass() * @since 1.0 */ public static function tearDownAfterClass() { $pidPath = JPATH_ROOT . '/japplicationdaemontest.pid'; if (file_exists($pidPath)) { unlink($pidPath); } ini_restore('memory_limit'); parent::tearDownAfterClass(); }
public static function tearDownAfterClass() { parent::tearDownAfterClass(); self::removeDatasets(self::$datasetRegistryTestClass); foreach (self::$connectionPoolTestClass as $conn) { $conn->disconnect(); } self::$connectionPoolTestClass = array(); self::$datasetRegistryTestClass = null; }
public static function tearDownAfterClass() { $dataDir = \OC::$server->getConfig()->getSystemValue('datadirectory', \OC::$SERVERROOT . '/data-autotest'); self::tearDownAfterClassCleanFileMapper($dataDir); self::tearDownAfterClassCleanStorages(); self::tearDownAfterClassCleanFileCache(); self::tearDownAfterClassCleanStrayDataFiles($dataDir); self::tearDownAfterClassCleanStrayHooks(); parent::tearDownAfterClass(); }
public static function tearDownAfterClass() { parent::tearDownAfterClass(); $c = self::get_called_class(); if (!method_exists($c, 'wpTearDownAfterClass')) { return; } call_user_func(array($c, 'wpTearDownAfterClass')); self::commit_transaction(); }
/** * This method is called after the last test of this test class is run. */ public static function tearDownAfterClass() { if (self::$aerospike->isConnected()) { foreach (self::$keys as $key) { // TODO: check existence of $key in Aerospike. self::$aerospike->remove($key); } self::$aerospike->close(); } parent::tearDownAfterClass(); }
public static function tearDownAfterClass() { Mage::app()->getStore()->setConfig('dev/log/active', self::$_oldLogActive); self::$_oldLogActive = null; Mage::app()->getStore()->setConfig('dev/log/exception_file', self::$_oldExceptionFile); self::$_oldExceptionFile = null; Mage::getConfig()->setNode('global/log/core/writer_model', self::$_oldWriterModel); self::$_oldWriterModel = null; Stub_Mage_Catalog_Model_CategoryTest_Zend_Log_Writer_Stream::$exceptions = array(); parent::tearDownAfterClass(); }
public static function tearDownAfterClass() { parent::tearDownAfterClass(); $method = "DELETE"; $url = "http://10.232.42.205/test"; curl_setopt(self::$ch, CURLOPT_URL, $url); curl_setopt(self::$ch, CURLOPT_PORT, 9200); curl_setopt(self::$ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt(self::$ch, CURLOPT_CUSTOMREQUEST, strtoupper($method)); $result = curl_exec(self::$ch); }
public static function tearDownAfterClass() { parent::tearDownAfterClass(); $cfg = (require realpath(__DIR__ . '/../../../../config') . '/aws.php'); if (empty($cfg['secret']) || empty($cfg['key'])) { return; } else { $s3 = S3Client::factory($cfg); $s3->clearBucket(self::$bucket); $s3->deleteBucket(['Bucket' => self::$bucket]); } }
public static function tearDownAfterClass() { parent::tearDownAfterClass(); if (file_exists(__DIR__ . '/tmp/php5-fpm.pid')) { exec(sprintf('kill %d', file_get_contents(__DIR__ . '/tmp/php5-fpm.pid'))); while (file_exists(__DIR__ . '/tmp/php5-fpm.pid')) { usleep(100000); } } if (file_exists(__DIR__ . '/tmp/php5-fpm.log')) { unlink(__DIR__ . '/tmp/php5-fpm.log'); } }
public static function tearDownAfterClass() { Mage::app()->getStore()->setConfig('dev/log/active', self::$_oldLogActive); self::$_oldLogActive = null; Mage::app()->getStore()->setConfig('dev/log/exception_file', self::$_oldExceptionFile); self::$_oldExceptionFile = null; Mage::getConfig()->setNode('global/log/core/writer_model', self::$_oldWriterModel); self::$_oldWriterModel = null; /** * @TODO: refactor this test * Changing store configuration in such a way totally breaks the idea of application isolation. * Class declaration in data fixture file is dumb too. * Added a quick fix to be able run separate tests with "phpunit --filter testMethod" */ if (class_exists('Stub_Mage_Catalog_Model_CategoryTest_Zend_Log_Writer_Stream', false)) { Stub_Mage_Catalog_Model_CategoryTest_Zend_Log_Writer_Stream::$exceptions = array(); } parent::tearDownAfterClass(); }
public static function tearDownAfterClass() { if (!self::$wasDatabaseAllowed && self::$realDatabase !== null) { // in case an error is thrown in a test, PHPUnit jumps straight to tearDownAfterClass, // so we need the database again \OC::$server->registerService('DatabaseConnection', function () { return self::$realDatabase; }); } $dataDir = \OC::$server->getConfig()->getSystemValue('datadirectory', \OC::$SERVERROOT . '/data-autotest'); if (self::$wasDatabaseAllowed && \OC::$server->getDatabaseConnection()) { $queryBuilder = \OC::$server->getDatabaseConnection()->getQueryBuilder(); self::tearDownAfterClassCleanShares($queryBuilder); self::tearDownAfterClassCleanStorages($queryBuilder); self::tearDownAfterClassCleanFileCache($queryBuilder); } self::tearDownAfterClassCleanStrayDataFiles($dataDir); self::tearDownAfterClassCleanStrayHooks(); self::tearDownAfterClassCleanStrayLocks(); parent::tearDownAfterClass(); }
/** * This method is called after the last test of this test class is run. */ public static function tearDownAfterClass() { if (isset(self::$dynamodb)) { self::deleteTable(); } parent::tearDownAfterClass(); }
/** * Stops all sessions, that might have started. * * @return void */ public static function tearDownAfterClass() { parent::tearDownAfterClass(); self::$mink->stopSessions(); }
public static function tearDownAfterClass() { parent::tearDownAfterClass(); }
/** * This method is called after the last test of this test class is run. */ public static function tearDownAfterClass() { self::$db->query("DROP DATABASE IF EXISTS `jasny_config_test`"); self::$db = null; parent::tearDownAfterClass(); }
/** * {@inheritdoc} */ public static function tearDownAfterClass() { // Free up memory: Precompiled container. self::$initialContainerBuilder = NULL; parent::tearDownAfterClass(); }
public static function tearDownAfterClass() { putenv('PHP_ENV=' . static::$originalEnvironment); parent::tearDownAfterClass(); }
public static function tearDownAfterClass() { self::$dir = null; parent::tearDownAfterClass(); }
/** * {@inheritdoc} */ public static function tearDownAfterClass() { parent::tearDownAfterClass(); $cmd = sprintf('kill %d', self::$webServerPid); exec(escapeshellcmd($cmd)); self::$webServerPid = null; }