當前位置: 首頁>>代碼示例>>PHP>>正文


PHP ControllerTestCase::tearDown方法代碼示例

本文整理匯總了PHP中ControllerTestCase::tearDown方法的典型用法代碼示例。如果您正苦於以下問題:PHP ControllerTestCase::tearDown方法的具體用法?PHP ControllerTestCase::tearDown怎麽用?PHP ControllerTestCase::tearDown使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在ControllerTestCase的用法示例。


在下文中一共展示了ControllerTestCase::tearDown方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: tearDown

 public function tearDown()
 {
     foreach ($this->localTestFiles as $file) {
         unlink($this->folder . '/' . $file);
     }
     parent::tearDown();
 }
開發者ID:belapp,項目名稱:opus4-application,代碼行數:7,代碼來源:FilesTest.php

示例2: tearDown

 public function tearDown()
 {
     if ($this->createsModels) {
         $this->deleteNewModels();
     }
     parent::tearDown();
 }
開發者ID:belapp,項目名稱:opus4-application,代碼行數:7,代碼來源:CrudControllerTestCase.php

示例3: tearDown

 /**
  * tearDown
  *
  * @return void
  */
 public function tearDown()
 {
     parent::tearDown();
     CakeSession::clear();
     CakeSession::destroy();
     ClassRegistry::flush();
 }
開發者ID:dlpc,項目名稱:CakeWX,代碼行數:12,代碼來源:CroogoControllerTestCase.php

示例4: tearDown

 protected function tearDown()
 {
     if (!is_null($this->config)) {
         Zend_Registry::set('Zend_Config', $this->config);
     }
     // Cleanup of Log File
     $config = Zend_Registry::get('Zend_Config');
     $filename = $config->workspacePath . DIRECTORY_SEPARATOR . 'log' . DIRECTORY_SEPARATOR . 'opus_consistency-check.log';
     if (file_exists($filename)) {
         unlink($filename);
     }
     // Cleanup of Lock File
     if (file_exists($filename . '.lock')) {
         unlink($filename . '.lock');
     }
     // Cleanup of Jobs Table
     $jobs = Opus_Job::getByLabels(array(Opus_Job_Worker_ConsistencyCheck::LABEL));
     foreach ($jobs as $job) {
         try {
             $job->delete();
         } catch (Exception $e) {
             // ignore
         }
     }
     parent::tearDown();
 }
開發者ID:belapp,項目名稱:opus4-application,代碼行數:26,代碼來源:IndexMaintenanceTest.php

示例5: tearDown

 function tearDown()
 {
     Cache::clear(false, 'default');
     ConnectionManager::drop('cacher');
     unset($this->CacheData);
     parent::tearDown();
 }
開發者ID:jeremyharris,項目名稱:cacher,代碼行數:7,代碼來源:CacheBehaviorTest.php

示例6: tearDown

 public function tearDown()
 {
     parent::tearDown();
     $testRole = new Opus_UserRole($this->roleId);
     $testRole->delete();
     $userAccount = new Opus_Account($this->userId);
     $userAccount->delete();
 }
開發者ID:belapp,項目名稱:opus4-application,代碼行數:8,代碼來源:AclProviderTest.php

示例7: tearDown

 public function tearDown()
 {
     $collectionRole = Opus_CollectionRole::fetchByName('NewTestColRoleName');
     if (!is_null($collectionRole)) {
         $collectionRole->delete();
     }
     parent::tearDown();
 }
開發者ID:belapp,項目名稱:opus4-application,代碼行數:8,代碼來源:CollectionRoleOaiNameUniqueTest.php

示例8: tearDown

 /**
  * tearDown
  *
  * @return void
  */
 public function tearDown()
 {
     parent::tearDown();
     if (CakeSession::started()) {
         CakeSession::clear();
         CakeSession::destroy();
     }
     ClassRegistry::flush();
 }
開發者ID:saydulk,項目名稱:croogo,代碼行數:14,代碼來源:CroogoControllerTestCase.php

示例9: tearDown

 protected function tearDown()
 {
     $testJobs = Opus_Job::getAll($this->jobIds);
     foreach ($testJobs as $job) {
         $job->delete();
     }
     Zend_Registry::set('Zend_Config', $this->__configBackup);
     parent::tearDown();
 }
開發者ID:belapp,項目名稱:opus4-application,代碼行數:9,代碼來源:JobControllerTest.php

示例10: tearDown

 public function tearDown()
 {
     parent::tearDown();
     foreach ($this->contentFiles as $contentFile) {
         unlink(APPLICATION_PATH . DIRECTORY_SEPARATOR . $this->contentBasepath . DIRECTORY_SEPARATOR . $contentFile);
     }
     if (is_file(APPLICATION_PATH . DIRECTORY_SEPARATOR . $this->tmxTarget)) {
         unlink(APPLICATION_PATH . DIRECTORY_SEPARATOR . $this->tmxTarget);
     }
 }
開發者ID:belapp,項目名稱:opus4-application,代碼行數:10,代碼來源:StaticPageTest.php

示例11: tearDown

 public function tearDown()
 {
     if (!is_null($this->nonEmptyCollectionRole) && !is_null($this->nonEmptyCollectionRole->getId())) {
         $this->nonEmptyCollectionRole->delete();
     }
     if (!is_null($this->emptyCollectionRole) && !is_null($this->emptyCollectionRole->getId())) {
         $this->emptyCollectionRole->delete();
     }
     parent::tearDown();
 }
開發者ID:belapp,項目名稱:opus4-application,代碼行數:10,代碼來源:CollectionControllerTest.php

示例12: tearDown

 public function tearDown()
 {
     $this->logoutUser();
     $this->restoreSecuritySetting();
     $user = Opus_Account::fetchAccountByLogin($this->userName);
     $user->delete();
     $userRole = Opus_UserRole::fetchByName($this->roleName);
     $userRole->delete();
     parent::tearDown();
 }
開發者ID:belapp,項目名稱:opus4-application,代碼行數:10,代碼來源:SeriesAdminTest.php

示例13: tearDown

 public function tearDown()
 {
     reset($this->inserts);
     foreach ($this->inserts as $id => $insert) {
         if (!$insert['persistence']) {
             $this->projectMapper->delete($insert['p']);
         }
     }
     parent::tearDown();
 }
開發者ID:racporto,項目名稱:c3op,代碼行數:10,代碼來源:ProjectMapper.php

示例14: tearDown

 public function tearDown()
 {
     $collectionRole = new Opus_CollectionRole($this->collectionRoleId);
     $collectionRole->delete();
     if (!is_null($this->moveTestColId)) {
         $collectionRole = new Opus_CollectionRole($this->moveTestColId);
         $collectionRole->delete();
     }
     parent::tearDown();
 }
開發者ID:belapp,項目名稱:opus4-application,代碼行數:10,代碼來源:CollectionRoleTest.php

示例15: tearDown

 public function tearDown()
 {
     $projectsAfterTests = $this->projectMapper->getAllIds();
     foreach ($projectsAfterTests as $id) {
         if (!in_array($id, $this->projectsBeforeTests)) {
             $project = $this->projectMapper->findById($id);
             $this->projectMapper->delete($project);
         }
     }
     parent::tearDown();
 }
開發者ID:racporto,項目名稱:c3op,代碼行數:11,代碼來源:ProjectEdit.php


注:本文中的ControllerTestCase::tearDown方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。