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


PHP SapphireTest::tearDown方法代码示例

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


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

示例1: tearDown

 public function tearDown()
 {
     // Remove all StaticPagesQueue that might be left after running a testcase
     self::empty_temp_db();
     Config::inst()->unnest();
     parent::tearDown();
 }
开发者ID:spark-green,项目名称:silverstripe-staticpublishqueue,代码行数:7,代码来源:StaticPagesQueueTest.php

示例2: tearDown

 function tearDown()
 {
     parent::tearDown();
     Chronos::set_config_dir($this->oldConf);
     $this->clearTempFiles();
     // finish clean
 }
开发者ID:helpfulrobot,项目名称:silverstripe-chronos,代码行数:7,代码来源:ChronosTest.php

示例3: tearDown

 public function tearDown()
 {
     $_SERVER['HTTP_HOST'] = $this->oldhost;
     Config::unnest();
     Email::set_mailer(new Mailer());
     parent::tearDown();
 }
开发者ID:helpfulrobot,项目名称:silverstripe-comment-notifications,代码行数:7,代码来源:CommentNotifierTest.php

示例4: tearDown

 public function tearDown()
 {
     Injector::unnest();
     SS_Datetime::clear_mock_now();
     Config::unnest();
     parent::tearDown();
 }
开发者ID:patricknelson,项目名称:silverstripe-hybridsessions,代码行数:7,代码来源:HybridSessionAbstractTest.php

示例5: tearDown

 public function tearDown()
 {
     AssetStoreTest_SpyStore::reset();
     SS_Filesystem::removeFolder($this->getBasePath());
     parent::tearDown();
     Config::unnest();
 }
开发者ID:jacobbuck,项目名称:silverstripe-framework,代码行数:7,代码来源:FileMigrationHelperTest.php

示例6: tearDown

 function tearDown()
 {
     Object::remove_extension("SiteTree", "FilesystemPublisher('../FilesystemPublisherTest-static-folder/')");
     SiteTree::$write_homepage_map = true;
     FilesystemPublisher::$domain_based_caching = $this->orig['domain_based_caching'];
     parent::tearDown();
 }
开发者ID:Raiser,项目名称:Praktikum,代码行数:7,代码来源:FilesystemPublisherTest.php

示例7: tearDown

 public function tearDown()
 {
     parent::tearDown();
     i18n::set_locale($this->originalLocale);
     Config::inst()->remove('TimeField', 'default_config');
     Config::inst()->update('TimeField', 'default_config', $this->origTimeConfig);
 }
开发者ID:congaaids,项目名称:silverstripe-framework,代码行数:7,代码来源:TimeFieldTest.php

示例8: tearDown

 public function tearDown()
 {
     parent::tearDown();
     i18n::set_locale($this->originalLocale);
     DateField::$default_config['dateformat'] = $this->origDateFormat;
     TimeField::$default_config['timeformat'] = $this->origTimeFormat;
 }
开发者ID:normann,项目名称:sapphire,代码行数:7,代码来源:DatetimeFieldTest.php

示例9: tearDown

 public function tearDown()
 {
     // TODO Remove director rule, currently API doesnt allow this
     // Reinstate the original REQUEST_URI after it was modified by some tests
     $_SERVER['REQUEST_URI'] = self::$originalRequestURI;
     parent::tearDown();
 }
开发者ID:normann,项目名称:sapphire,代码行数:7,代码来源:DirectorTest.php

示例10: tearDown

 public function tearDown()
 {
     parent::tearDown();
     unset($this->mp3player);
     unset($this->socks);
     unset($this->beachball);
 }
开发者ID:burnbright,项目名称:silverstripe-shop,代码行数:7,代码来源:OrderTest.php

示例11: tearDown

 public function tearDown()
 {
     if ($this->origBackend) {
         Image::set_backend($this->origBackend);
     }
     // Remove the test files that we've created
     $fileIDs = $this->allFixtureIDs('Image');
     foreach ($fileIDs as $fileID) {
         $file = DataObject::get_by_id('Image', $fileID);
         if ($file && file_exists(BASE_PATH . "/{$file->Filename}")) {
             unlink(BASE_PATH . "/{$file->Filename}");
         }
     }
     // Remove the test folders that we've created
     $folderIDs = $this->allFixtureIDs('Folder');
     foreach ($folderIDs as $folderID) {
         $folder = DataObject::get_by_id('Folder', $folderID);
         if ($folder && file_exists(BASE_PATH . "/{$folder->Filename}")) {
             Filesystem::removeFolder(BASE_PATH . "/{$folder->Filename}");
         }
         if ($folder && file_exists(BASE_PATH . "/" . $folder->Filename . "_resampled")) {
             Filesystem::removeFolder(BASE_PATH . "/" . $folder->Filename . "_resampled");
         }
     }
     parent::tearDown();
 }
开发者ID:aaronleslie,项目名称:aaronunix,代码行数:26,代码来源:ImageTest.php

示例12: 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,代码来源:ProductOrderItemTest.php

示例13: tearDown

 public function tearDown()
 {
     while ($this->nestingLevel > 0) {
         $this->nestingLevel--;
         Config::unnest();
     }
     parent::tearDown();
 }
开发者ID:jacobbuck,项目名称:silverstripe-framework,代码行数:8,代码来源:InjectorTest.php

示例14: 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:helpfulrobot,项目名称:comperio-silverstripe-cms,代码行数:8,代码来源:VirtualPageTest.php

示例15: tearDown

 function tearDown()
 {
     parent::tearDown();
     // set old member::get_unique_identifier_field value
     if ($this->member_unique_identifier_field) {
         Member::set_unique_identifier_field($this->member_unique_identifier_field);
     }
 }
开发者ID:nomidi,项目名称:sapphire,代码行数:8,代码来源:RestfulServiceTest.php


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