当前位置: 首页>>代码示例>>PHP>>正文


PHP WebTestCase::tearDown方法代码示例

本文整理汇总了PHP中Symfony\Bundle\FrameworkBundle\Test\WebTestCase::tearDown方法的典型用法代码示例。如果您正苦于以下问题:PHP WebTestCase::tearDown方法的具体用法?PHP WebTestCase::tearDown怎么用?PHP WebTestCase::tearDown使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Symfony\Bundle\FrameworkBundle\Test\WebTestCase的用法示例。


在下文中一共展示了WebTestCase::tearDown方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: tearDown

 /**
  * {@inheritDoc}
  */
 protected function tearDown()
 {
     parent::tearDown();
     if ($this->em instanceof \Doctrine\ORM\EntityManager) {
         $this->em->close();
     }
 }
开发者ID:skonsoft,项目名称:postal-address-bundle,代码行数:10,代码来源:WebTestCase.php

示例2: tearDown

 public function tearDown()
 {
     if ($this->container !== null) {
         $this->container->get('doctrine')->getConnection()->close();
     }
     parent::tearDown();
 }
开发者ID:nicolaskern,项目名称:CCDNUserSecurityBundle,代码行数:7,代码来源:TestBase.php

示例3: tearDown

 protected function tearDown()
 {
     $this->truncateTables();
     $this->nullifyProperties();
     parent::tearDown();
     static::$kernel = null;
 }
开发者ID:supportyard,项目名称:framework-bundle,代码行数:7,代码来源:FunctionalTestCase.php

示例4: tearDown

 /**
  * {@inheritDoc}
  */
 protected function tearDown()
 {
     parent::tearDown();
     if ($this->em) {
         $this->em->close();
     }
 }
开发者ID:Drake86cnf,项目名称:yacare,代码行数:10,代码来源:PruebaFuncional.php

示例5: tearDown

 protected function tearDown()
 {
     parent::tearDown();
     foreach (glob($this->webDir . '/*{.xml,.xml.gz}', GLOB_BRACE) as $file) {
         unlink($file);
     }
 }
开发者ID:hyperlator,项目名称:PrestaSitemapBundle,代码行数:7,代码来源:DumpSitemapsCommandTest.php

示例6: tearDown

 protected function tearDown()
 {
     //Close & unsets
     if (is_object($this->em)) {
         $this->em->getConnection()->close();
         $this->em->close();
     }
     unset($this->em);
     unset($this->container);
     unset($this->kern);
     unset($this->client);
     //Nettoyage des mocks
     //http://kriswallsmith.net/post/18029585104/faster-phpunit
     $refl = new \ReflectionObject($this);
     foreach ($refl->getProperties() as $prop) {
         if (!$prop->isStatic() && 0 !== strpos($prop->getDeclaringClass()->getName(), 'PHPUnit_')) {
             $prop->setAccessible(true);
             $prop->setValue($this, null);
         }
     }
     //Nettoyage du garbage
     if (!gc_enabled()) {
         gc_enable();
     }
     gc_collect_cycles();
     //Parent
     parent::tearDown();
 }
开发者ID:Reallymute,项目名称:IRMApplicative,代码行数:28,代码来源:CarmaWebTestCase.php

示例7: tearDown

 /**
  * Cleans up the environment after running a test.
  */
 protected function tearDown()
 {
     $this->ipBannedRepository = null;
     $this->ipBanned = null;
     $this->em = null;
     parent::tearDown();
 }
开发者ID:Alexandre-T,项目名称:jeu-de-role,代码行数:10,代码来源:IpBannedRepositoryTest.php

示例8: tearDown

 public function tearDown()
 {
     NullPersister::$incrementTotalAccessCalled = false;
     NullPersister::$incrementRepositoryAccessCalled = false;
     NullPersister::$addRepositoryToLatestAccessedCalled = false;
     NullPersister::$incrementRepositoryAccessTypeCalled = false;
     parent::tearDown();
 }
开发者ID:kartik-v,项目名称:badge-poser,代码行数:8,代码来源:StatsFunctionalTest.php

示例9: tearDown

 public function tearDown()
 {
     foreach ($this->client->getContainer()->getMockedServices() as $id => $service) {
         $this->client->getContainer()->unmock($id);
     }
     \Mockery::close();
     $this->client = null;
     parent::tearDown();
 }
开发者ID:llvdl,项目名称:DominoSymfony,代码行数:9,代码来源:MockeryWebTestCase.php

示例10: tearDown

 /**
  * {@inheritdoc}
  */
 protected function tearDown()
 {
     $this->rollbackTransaction();
     BaseWebTestCase::tearDown();
     static::$client = null;
     static::$container = null;
     static::$kernel = null;
     $this->cleanFixtures();
 }
开发者ID:ruslan-polutsygan,项目名称:dev-bundle,代码行数:12,代码来源:DatabaseTestCase.php

示例11: tearDown

 public function tearDown()
 {
     /*
      * Close doctrine connections to avoid having a 'too many connections'
      * message when running many tests
      */
     $this->container->get('doctrine')->getConnection()->close();
     parent::tearDown();
 }
开发者ID:joschi127,项目名称:doctrine-entity-override-bundle,代码行数:9,代码来源:TestBase.php

示例12: tearDown

 public function tearDown()
 {
     parent::tearDown();
     $this->client = null;
     $this->container = null;
     $this->listener = null;
     $this->service = null;
     $this->resolver = null;
 }
开发者ID:mauriau,项目名称:xi-bundle-breadcrumbs,代码行数:9,代码来源:BreadcrumbListenerTest.php

示例13: tearDown

 /**
  * {@inheritdoc}
  */
 public function tearDown()
 {
     if (!self::$shareWorkspace && null !== self::$workspace) {
         $filesystem = new Filesystem();
         $filesystem->remove(self::$workspace);
         self::$workspace = null;
         TestHomePathDeterminator::resetPath();
     }
     parent::tearDown();
 }
开发者ID:contao,项目名称:package-manager,代码行数:13,代码来源:WebTestCase.php

示例14: tearDown

 /**
  * Tear down
  */
 public function tearDown()
 {
     if (!static::$application) {
         return;
     }
     $output = new BufferedOutput();
     static::$application->run(new ArrayInput(array('command' => 'doctrine:database:drop', '--no-interaction' => true, '--force' => true, '--quiet' => true)), $output);
     if (!$this->runCommandsQuietly()) {
         echo $output->fetch();
     }
     parent::tearDown();
 }
开发者ID:alexislefebvre,项目名称:axstrad-test-bundle,代码行数:15,代码来源:WebTestCase.php

示例15: tearDown

 protected function tearDown()
 {
     // we can't simply do "$client->shutdown()" because sometimes
     // when an integration test fails (e.g. due to an error in the
     // container configuration) the $client property is set to null
     // (by PHPUnit?) and the original error is hidden behind a fatal
     // "Call to a member function shutdown() on a non-object"...
     if ($this->client instanceof TransactionalTestClient) {
         $this->client->shutdown();
     }
     parent::tearDown();
 }
开发者ID:ngydat,项目名称:CoreBundle,代码行数:12,代码来源:TransactionalTestCase.php


注:本文中的Symfony\Bundle\FrameworkBundle\Test\WebTestCase::tearDown方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。