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


PHP AbstractHttpControllerTestCase::tearDown方法代碼示例

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


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

示例1: tearDown

 protected function tearDown()
 {
     parent::tearDown();
     $tool = new SchemaTool($this->em);
     $tool->dropDatabase();
     unset($this->em);
 }
開發者ID:dotuancd,項目名稱:secretary,代碼行數:7,代碼來源:AuthController.php

示例2: tearDown

 public function tearDown()
 {
     if ($this->db instanceof \MongoDB) {
         $this->db->drop();
     }
     parent::tearDown();
 }
開發者ID:alapini,項目名稱:apigility-3hr-tutorial,代碼行數:7,代碼來源:AuthControllerWithMongoAdapterTest.php

示例3: tearDown

 public function tearDown()
 {
     $this->sessionProgress->getManager()->getStorage()->clear('progress_tracker');
     $forms = new Container('forms');
     $forms->getManager()->getStorage()->clear('forms');
     parent::tearDown();
 }
開發者ID:zfury,項目名稱:cmf,代碼行數:7,代碼來源:IndexControllerTest.php

示例4: tearDown

 protected function tearDown()
 {
     foreach ($this->httpMocks as $mock) {
         $mock->verify();
     }
     parent::tearDown();
     M::close();
 }
開發者ID:ministryofjustice,項目名稱:ZendRestModule,代碼行數:8,代碼來源:AbstractTestCase.php

示例5: tearDown

 /**
  * @see \Zend\Test\PHPUnit\Controller\AbstractControllerTestCase::tearDown()
  */
 public function tearDown()
 {
     if ($this->getDbCreated()) {
         $this->getEntityManager()->clear();
         $this->cleanDatabase();
     }
     unset($this->serviceManager, $this->entityManager, $this->ormExcecutor, $this->schemaTool, $this->ormPurger);
     parent::tearDown();
 }
開發者ID:zf2-boiler-app,項目名稱:app-test,代碼行數:12,代碼來源:AbstractHttpControllerTestCase.php

示例6: testApplicationClassAndTestRestoredConsoleFlag

    public function testApplicationClassAndTestRestoredConsoleFlag()
    {
        $this->assertTrue(Console::isConsole());
        $this->getApplication();
        $this->assertFalse(Console::isConsole());
        $this->tearDown();
        $this->assertTrue(Console::isConsole());

        Console::overrideIsConsole(false);
        parent::setUp();

        $this->assertFalse(Console::isConsole());
        $this->getApplication();
        $this->assertFalse(Console::isConsole());

        parent::tearDown();

        $this->assertFalse(Console::isConsole());
    }
開發者ID:benivaldo,項目名稱:zf2-na-pratica,代碼行數:19,代碼來源:AbstractControllerTestCaseTest.php

示例7: tearDown

 /**
  * Cleans up the environment after running a test.
  */
 protected function tearDown()
 {
     // TODO Auto-generated IndexControllerTest::tearDown()
     $this->indexController = null;
     parent::tearDown();
 }
開發者ID:arstropica,項目名稱:zf-tenstreet,代碼行數:9,代碼來源:IndexControllerTest.php

示例8: tearDown

 public function tearDown()
 {
     unset($_SERVER['HTTP_X_REQUEST_ID']);
     return parent::tearDown();
 }
開發者ID:rstgroup,項目名稱:request-id-module,代碼行數:5,代碼來源:RequestIdIntegrationTest.php

示例9: tearDown

 /**
  * Drop temporary db & restore params
  */
 public function tearDown()
 {
     parent::tearDown();
     $sm = $this->getApplication()->getServiceManager();
     \Zork\ServiceManager\ServiceManager::unregisterServices($sm);
     $sm = null;
     $config = $this->getApplicationConfig();
     $this->reset();
     $this->gc();
     if (!empty($config['db']) && $this->originalDbName) {
         $config['db']['dbname'] = $this->originalDbName;
         $db = new DbAdapter($config['db']);
         $platform = $db->getPlatform();
         $db->query(sprintf('DROP DATABASE %s', $platform->quoteIdentifier($this->temporaryDbName)), DbAdapter::QUERY_MODE_EXECUTE);
         $platform = null;
         $db = null;
         $this->gc();
     }
     chdir($this->orginalCwd);
 }
開發者ID:gridguyz,項目名稱:zork,代碼行數:23,代碼來源:AbstractHttpControllerTestCase.php

示例10: tearDown

 protected function tearDown()
 {
     parent::tearDown();
 }
開發者ID:argentinaluiz,項目名稱:js_zf2_library,代碼行數:4,代碼來源:JSTestControllerCase.php

示例11: testApplicationClassAndTestRestoredConsoleFlag

 public function testApplicationClassAndTestRestoredConsoleFlag()
 {
     $this->assertTrue(Console::isConsole(), '1. Console::isConsole returned false in initial test');
     $this->getApplication();
     $this->assertFalse(Console::isConsole(), '2. Console::isConsole returned true after retrieving application');
     $this->tearDown();
     $this->assertTrue(Console::isConsole(), '3. Console::isConsole returned false after tearDown');
     Console::overrideIsConsole(false);
     parent::setUp();
     $this->assertFalse(Console::isConsole(), '4. Console::isConsole returned true after parent::setUp');
     $this->getApplication();
     $this->assertFalse(Console::isConsole(), '5. Console::isConsole returned true after retrieving application');
     parent::tearDown();
     $this->assertFalse(Console::isConsole(), '6. Console.isConsole returned true after parent::tearDown');
 }
開發者ID:pnaq57,項目名稱:zf2demo,代碼行數:15,代碼來源:AbstractControllerTestCaseTest.php

示例12: tearDown

 /**
  * Cleans up the environment after running a test.
  */
 protected function tearDown()
 {
     // TODO Auto-generated AccountControllerTest::tearDown()
     $this->accountController = null;
     parent::tearDown();
 }
開發者ID:arstropica,項目名稱:zf2-dashboard,代碼行數:9,代碼來源:AccountControllerTest.php

示例13: tearDown

 protected function tearDown()
 {
     parent::tearDown();
     $this->dropDatabase();
 }
開發者ID:michelcandido,項目名稱:zf2-doctrine-tests,代碼行數:5,代碼來源:ControllerTestCase.php


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