本文整理汇总了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();
}
示例2: tearDown
public function tearDown()
{
if ($this->createsModels) {
$this->deleteNewModels();
}
parent::tearDown();
}
示例3: tearDown
/**
* tearDown
*
* @return void
*/
public function tearDown()
{
parent::tearDown();
CakeSession::clear();
CakeSession::destroy();
ClassRegistry::flush();
}
示例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();
}
示例5: tearDown
function tearDown()
{
Cache::clear(false, 'default');
ConnectionManager::drop('cacher');
unset($this->CacheData);
parent::tearDown();
}
示例6: tearDown
public function tearDown()
{
parent::tearDown();
$testRole = new Opus_UserRole($this->roleId);
$testRole->delete();
$userAccount = new Opus_Account($this->userId);
$userAccount->delete();
}
示例7: tearDown
public function tearDown()
{
$collectionRole = Opus_CollectionRole::fetchByName('NewTestColRoleName');
if (!is_null($collectionRole)) {
$collectionRole->delete();
}
parent::tearDown();
}
示例8: tearDown
/**
* tearDown
*
* @return void
*/
public function tearDown()
{
parent::tearDown();
if (CakeSession::started()) {
CakeSession::clear();
CakeSession::destroy();
}
ClassRegistry::flush();
}
示例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();
}
示例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);
}
}
示例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();
}
示例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();
}
示例13: tearDown
public function tearDown()
{
reset($this->inserts);
foreach ($this->inserts as $id => $insert) {
if (!$insert['persistence']) {
$this->projectMapper->delete($insert['p']);
}
}
parent::tearDown();
}
示例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();
}
示例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();
}