当前位置: 首页>>代码示例>>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;未经允许,请勿转载。