當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。