当前位置: 首页>>代码示例>>PHP>>正文


PHP FunctionalTest::tearDown方法代码示例

本文整理汇总了PHP中FunctionalTest::tearDown方法的典型用法代码示例。如果您正苦于以下问题:PHP FunctionalTest::tearDown方法的具体用法?PHP FunctionalTest::tearDown怎么用?PHP FunctionalTest::tearDown使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在FunctionalTest的用法示例。


在下文中一共展示了FunctionalTest::tearDown方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: tearDown

 public function tearDown()
 {
     parent::tearDown();
     $_SERVER['HTTP_USER_AGENT'] = self::$originalUserAgent;
     $_SERVER['HTTP_HOST'] = self::$originalHost;
     $_SERVER['HTTP_ACCEPT'] = self::$originalAccept;
 }
开发者ID:helpfulrobot,项目名称:silverstripe-mobile,代码行数:7,代码来源:MobileSiteControllerExtensionTest.php

示例2: tearDown

 /**
  * 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();
 }
开发者ID:antons-,项目名称:silverstripe-cms,代码行数:13,代码来源:ModelAsControllerTest.php

示例3: tearDown

 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;
 }
开发者ID:congaaids,项目名称:silverstripe-framework,代码行数:7,代码来源:BasicAuthTest.php

示例4: tearDown

 /**
  * 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();
 }
开发者ID:SustainableCoastlines,项目名称:loveyourwater,代码行数:13,代码来源:ModelAsControllerTest.php

示例5: tearDown

 public function tearDown()
 {
     SecurityToken::enable();
     $this->folder->deleteDatabaseOnly();
     Filesystem::removeFolder($this->folder->getFullPath());
     parent::tearDown();
 }
开发者ID:camfindlay,项目名称:silverstripe-versionedfiles,代码行数:7,代码来源:VersionedFileTest.php

示例6: tearDown

 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);
 }
开发者ID:nickbooties,项目名称:silverstripe-framework,代码行数:7,代码来源:LeftAndMainTest.php

示例7: tearDown

 function tearDown()
 {
     parent::tearDown();
     // Static publishing will just confuse things
     StaticPublisher::$disable_realtime = false;
     i18n::set_locale($this->origLocale);
 }
开发者ID:helpfulrobot,项目名称:silverstripe-cmsworkflow,代码行数:7,代码来源:WorkflowReportsTest.php

示例8: tearDown

 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;
 }
开发者ID:d-rivera-c,项目名称:silverstripe-cms,代码行数:8,代码来源:VirtualPageTest.php

示例9: tearDown

 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);
 }
开发者ID:miamollie,项目名称:echoAerial,代码行数:8,代码来源:ErrorPageTest.php

示例10: tearDown

 public function tearDown()
 {
     $this->image->delete();
     if ($this->reference) {
         $this->reference->delete();
     }
     parent::tearDown();
 }
开发者ID:camfindlay,项目名称:silverstripe-versionedfiles,代码行数:8,代码来源:VersionedImageTest.php

示例11: tearDown

 public function tearDown()
 {
     AssetStoreTest_SpyStore::reset();
     if ($this->oldReadingMode) {
         Versioned::set_reading_mode($this->oldReadingMode);
     }
     parent::tearDown();
 }
开发者ID:assertchris,项目名称:silverstripe-framework,代码行数:8,代码来源:UploadFieldTest.php

示例12: tearDown

 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);
 }
开发者ID:rixrix,项目名称:silverstripe-cms,代码行数:8,代码来源:ErrorPageTest.php

示例13: tearDown

 function tearDown()
 {
     parent::tearDown();
     /*
     Product::set_site_currency($this->orig['Product_site_currency']);
     Product::set_supported_currencies($this->orig['Product_supported_currencies']);
     */
 }
开发者ID:nieku,项目名称:silverstripe-ecommerce,代码行数:8,代码来源:ProductTest.php

示例14: tearDown

	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();
	}
开发者ID:redema,项目名称:silverstripe-gallerist,代码行数:9,代码来源:GalleristPageDecoratorTest.php

示例15: tearDown

 public function tearDown()
 {
     if ($this->securityEnabled) {
         SecurityToken::enable();
     } else {
         SecurityToken::disable();
     }
     parent::tearDown();
 }
开发者ID:tcaiger,项目名称:mSupplyNZ,代码行数:9,代码来源:CommentingControllerTest.php


注:本文中的FunctionalTest::tearDown方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。