public function tearDown()
 {
     parent::tearDown();
     $_SERVER['HTTP_USER_AGENT'] = self::$originalUserAgent;
     $_SERVER['HTTP_HOST'] = self::$originalHost;
     $_SERVER['HTTP_ACCEPT'] = self::$originalAccept;
 }
コード例 #2
0
 /**
  * New tests require nested urls to be enabled, but the site might not 
  * support nested URLs. 
  * This setup will enable nested-urls for this test and resets the state
  * after the tests have been performed.
  */
 public function tearDown()
 {
     if (isset($this->orig['nested_urls']) && !$this->orig['nested_urls']) {
         SiteTree::config()->nested_urls = false;
     }
     parent::tearDown();
 }
コード例 #3
0
 public function tearDown()
 {
     parent::tearDown();
     BasicAuth::protect_entire_site(false);
     Member::config()->unique_identifier_field = self::$original_unique_identifier_field;
     Security::$force_database_is_ready = null;
 }
コード例 #4
0
 /**
  * New tests require nested urls to be enabled, but the site might not 
  * support nested URLs. 
  * This setup will enable nested-urls for this test and resets the state
  * after the tests have been performed.
  */
 function tearDown()
 {
     if (isset($this->orig['nested_urls']) && !$this->orig['nested_urls']) {
         SiteTree::disable_nested_urls();
     }
     parent::tearDown();
 }
コード例 #5
0
 public function tearDown()
 {
     SecurityToken::enable();
     $this->folder->deleteDatabaseOnly();
     Filesystem::removeFolder($this->folder->getFullPath());
     parent::tearDown();
 }
コード例 #6
0
 public function tearDown()
 {
     parent::tearDown();
     Config::inst()->update('LeftAndMain', 'extra_requirements_css', $this->backupCss);
     Config::inst()->update('LeftAndMain', 'extra_requirements_javascript', $this->backupJs);
     Requirements::set_combined_files_enabled($this->backupCombined);
 }
コード例 #7
0
 function tearDown()
 {
     parent::tearDown();
     // Static publishing will just confuse things
     StaticPublisher::$disable_realtime = false;
     i18n::set_locale($this->origLocale);
 }
コード例 #8
0
 public function tearDown()
 {
     parent::tearDown();
     Config::inst()->remove('VirtualPage', 'initially_copied_fields');
     Config::inst()->remove('VirtualPage', 'non_virtual_fields');
     VirtualPage::config()->initially_copied_fields = $this->origInitiallyCopiedFields;
     VirtualPage::config()->non_virtual_fields = $this->origNonVirtualField;
 }
コード例 #9
0
 public function tearDown()
 {
     parent::tearDown();
     ErrorPage::config()->static_filepath = $this->orig['ErrorPage_staticfilepath'];
     Filesystem::removeFolder($this->tmpAssetsPath . '/ErrorPageTest');
     Filesystem::removeFolder($this->tmpAssetsPath);
     Config::inst()->update('Director', 'environment_type', $this->origEnvType);
 }
コード例 #10
0
 public function tearDown()
 {
     $this->image->delete();
     if ($this->reference) {
         $this->reference->delete();
     }
     parent::tearDown();
 }
コード例 #11
0
 public function tearDown()
 {
     AssetStoreTest_SpyStore::reset();
     if ($this->oldReadingMode) {
         Versioned::set_reading_mode($this->oldReadingMode);
     }
     parent::tearDown();
 }
コード例 #12
0
 function tearDown()
 {
     parent::tearDown();
     ErrorPage::set_static_filepath($this->orig['ErrorPage_staticfilepath']);
     Director::set_environment_type($this->orig['Director_environmenttype']);
     Filesystem::removeFolder($this->tmpAssetsPath . '/ErrorPageTest');
     Filesystem::removeFolder($this->tmpAssetsPath);
 }
コード例 #13
0
 function tearDown()
 {
     parent::tearDown();
     /*
     Product::set_site_currency($this->orig['Product_site_currency']);
     Product::set_supported_currencies($this->orig['Product_supported_currencies']);
     */
 }
コード例 #14
0
	public function tearDown() {
		Object::add_static_var('GalleristPageDecorator', 'markup_template', $this->oldMarkupTemplate, true);
		Object::add_static_var('Page', 'gallerist_active', $this->oldGalleristActive, true);
		foreach($this->allFixtureIDs('Image') as $fileID) {
			$file = DataObject::get_by_id('Image', $fileID);
			$file->delete();
		}
		parent::tearDown();
	}
コード例 #15
0
 public function tearDown()
 {
     if ($this->securityEnabled) {
         SecurityToken::enable();
     } else {
         SecurityToken::disable();
     }
     parent::tearDown();
 }
コード例 #16
0
	function tearDown() {
		if(!$this->origTranslatableSettings['enabled']) Translatable::disable();
		Translatable::set_default_lang($this->origTranslatableSettings['default_lang']);
		
		self::kill_temp_db();
		self::create_temp_db();
		
		parent::tearDown();
	}
コード例 #17
0
ファイル: SecurityTest.php プロジェクト: racontemoi/shibuichi
 function tearDown()
 {
     // Restore selected authenticator
     // MemberAuthenticator might not actually be present
     if (!in_array('MemberAuthenticator', $this->priorAuthenticators)) {
         Authenticator::unregister('MemberAuthenticator');
     }
     Authenticator::set_default_authenticator($this->priorDefaultAuthenticator);
     parent::tearDown();
 }
コード例 #18
0
 public function tearDown()
 {
     parent::tearDown();
     //if the token is turned on reset it before the next test run
     if ($this->useToken) {
         SecurityToken::enable();
     } else {
         SecurityToken::disable();
     }
 }
コード例 #19
0
 function tearDown()
 {
     parent::tearDown();
     //get rid of all lingering modifiers, order items etc
     if ($attributes = DataObject::get('OrderAttribute')) {
         foreach ($attributes as $attribute) {
             $attribute->delete();
             $attribute->destroy();
         }
     }
 }
コード例 #20
0
 public function tearDown()
 {
     if ($this->securityWasEnabled) {
         SecurityToken::enable();
     } else {
         SecurityToken::disable();
     }
     Injector::unnest();
     Config::unnest();
     parent::tearDown();
 }
 public function tearDown()
 {
     // remove db records otherwise we end up with multiple stats
     foreach (URLStatistics::get() as $stat) {
         $stat->delete();
     }
     foreach (SocialQueue::get() as $queue) {
         $queue->delete();
     }
     parent::tearDown();
 }
コード例 #22
0
 function tearDown()
 {
     // Restore selected authenticator
     // MemberAuthenticator might not actually be present
     if (!in_array('MemberAuthenticator', $this->priorAuthenticators)) {
         Authenticator::unregister('MemberAuthenticator');
     }
     Authenticator::set_default_authenticator($this->priorDefaultAuthenticator);
     // Restore unique identifier field
     Member::set_unique_identifier_field($this->priorUniqueIdentifierField);
     parent::tearDown();
 }
 public function tearDown()
 {
     parent::tearDown();
     if (file_exists(ASSETS_PATH . "/{$this->sitemap}")) {
         unlink(ASSETS_PATH . "/{$this->sitemap}");
     }
     $pages = Page::get();
     foreach ($pages as $page) {
         $page->delete();
     }
     $pages = SiteMapPage::get();
     foreach ($pages as $page) {
         $page->delete();
     }
 }
 public function tearDown()
 {
     MultilingualRootURLController::set_use_locale_url($this->origLocaleRoutingEnabled);
     Translatable::set_current_locale($this->origCurrentLocale);
     Translatable::set_default_locale($this->origLocale);
     Translatable::set_allowed_locales($this->origAllowedLocales);
     i18n::set_locale($this->origi18nLocale);
     Cookie::force_expiry('language');
     if ($this->origCookieLocale) {
         Cookie::set('language', $this->origCookieLocale);
     }
     $_SERVER['HTTP_ACCEPT_LANGUAGE'] = $this->origAcceptLanguage;
     MultilingualRootURLController::reset();
     parent::tearDown();
 }
コード例 #25
0
 public function tearDown()
 {
     parent::tearDown();
     /* Remove the test files that we've created */
     $fileIDs = $this->allFixtureIDs('File');
     foreach ($fileIDs as $fileID) {
         $file = DataObject::get_by_id('File', $fileID);
         if ($file && file_exists(BASE_PATH . "/{$file->Filename}")) {
             unlink(BASE_PATH . "/{$file->Filename}");
         }
     }
     // Remove left over folders and any files that may exist
     if (file_exists('../assets/FileTest.txt')) {
         unlink('../assets/FileTest.txt');
     }
 }
コード例 #26
0
ファイル: SecurityTest.php プロジェクト: tcaiger/mSupplyNZ
 public function tearDown()
 {
     // Restore selected authenticator
     // MemberAuthenticator might not actually be present
     if (!in_array('MemberAuthenticator', $this->priorAuthenticators)) {
         Authenticator::unregister('MemberAuthenticator');
     }
     foreach ($this->priorAuthenticators as $authenticator) {
         Authenticator::register($authenticator);
     }
     Authenticator::set_default_authenticator($this->priorDefaultAuthenticator);
     // Restore unique identifier field
     Member::config()->unique_identifier_field = $this->priorUniqueIdentifierField;
     Security::config()->remember_username = $this->priorRememberUsername;
     parent::tearDown();
 }
コード例 #27
0
 function tearDown()
 {
     parent::tearDown();
     self::$is_running_test = true;
     $d = DataObject::get("DMSDocument");
     foreach ($d as $d1) {
         $d1->delete();
     }
     $t = DataObject::get("DMSTag");
     foreach ($t as $t1) {
         $t1->delete();
     }
     //delete the test folder after the test runs
     $this->delete(BASE_PATH . DIRECTORY_SEPARATOR . 'dms-assets-test-1234');
     //set the old DMS folder back again
     DMS::$dmsFolder = self::$dmsFolderOld;
     DMS::$dmsFolderSize = self::$dmsFolderSizeOld;
     self::$is_running_test = $this->originalIsRunningTest;
 }
 function tearDown()
 {
     /* Remove the test files that we've created */
     $fileIDs = $this->allFixtureIDs('File');
     foreach ($fileIDs as $fileID) {
         $file = DataObject::get_by_id('File', $fileID);
         if (file_exists(BASE_PATH . "/{$file->Filename}")) {
             unlink(BASE_PATH . "/{$file->Filename}");
         }
     }
     /* Remove the test folders that we've crated */
     $fileIDs = array_reverse($this->allFixtureIDs('Folder'));
     foreach ($fileIDs as $fileID) {
         $file = DataObject::get_by_id('Folder', $fileID);
         if (file_exists(BASE_PATH . "/{$file->Filename}")) {
             rmdir(BASE_PATH . "/{$file->Filename}");
         }
     }
     if (!in_array('MemberAuthenticator', $this->priorAuthenticators)) {
         Authenticator::unregister('MemberAuthenticator');
     }
     Authenticator::set_default_authenticator($this->priorDefaultAuthenticator);
     parent::tearDown();
 }
コード例 #29
0
 public function tearDown()
 {
     Member::config()->unique_identifier_field = $this->orig['Member_unique_identifier_field'];
     parent::tearDown();
 }
コード例 #30
0
 public function tearDown()
 {
     AssetStoreTest_SpyStore::reset();
     parent::tearDown();
 }