Ejemplo n.º 1
0
 /**
  * {@inheritDoc}
  */
 protected function tearDown()
 {
     parent::tearDown();
     if ($this->em instanceof \Doctrine\ORM\EntityManager) {
         $this->em->close();
     }
 }
 public function tearDown()
 {
     if ($this->container !== null) {
         $this->container->get('doctrine')->getConnection()->close();
     }
     parent::tearDown();
 }
 protected function tearDown()
 {
     $this->truncateTables();
     $this->nullifyProperties();
     parent::tearDown();
     static::$kernel = null;
 }
Ejemplo n.º 4
0
 /**
  * {@inheritDoc}
  */
 protected function tearDown()
 {
     parent::tearDown();
     if ($this->em) {
         $this->em->close();
     }
 }
 protected function tearDown()
 {
     parent::tearDown();
     foreach (glob($this->webDir . '/*{.xml,.xml.gz}', GLOB_BRACE) as $file) {
         unlink($file);
     }
 }
Ejemplo n.º 6
0
 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();
 }
 /**
  * Cleans up the environment after running a test.
  */
 protected function tearDown()
 {
     $this->ipBannedRepository = null;
     $this->ipBanned = null;
     $this->em = null;
     parent::tearDown();
 }
Ejemplo n.º 8
0
 public function tearDown()
 {
     NullPersister::$incrementTotalAccessCalled = false;
     NullPersister::$incrementRepositoryAccessCalled = false;
     NullPersister::$addRepositoryToLatestAccessedCalled = false;
     NullPersister::$incrementRepositoryAccessTypeCalled = false;
     parent::tearDown();
 }
Ejemplo n.º 9
0
 public function tearDown()
 {
     foreach ($this->client->getContainer()->getMockedServices() as $id => $service) {
         $this->client->getContainer()->unmock($id);
     }
     \Mockery::close();
     $this->client = null;
     parent::tearDown();
 }
 /**
  * {@inheritdoc}
  */
 protected function tearDown()
 {
     $this->rollbackTransaction();
     BaseWebTestCase::tearDown();
     static::$client = null;
     static::$container = null;
     static::$kernel = null;
     $this->cleanFixtures();
 }
 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();
 }
 public function tearDown()
 {
     parent::tearDown();
     $this->client = null;
     $this->container = null;
     $this->listener = null;
     $this->service = null;
     $this->resolver = null;
 }
Ejemplo n.º 13
0
 /**
  * {@inheritdoc}
  */
 public function tearDown()
 {
     if (!self::$shareWorkspace && null !== self::$workspace) {
         $filesystem = new Filesystem();
         $filesystem->remove(self::$workspace);
         self::$workspace = null;
         TestHomePathDeterminator::resetPath();
     }
     parent::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();
 }
Ejemplo n.º 15
0
 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();
 }
 public function tearDown()
 {
     /**
      * Used to solve the "Too many connections" problem.
      * @see http://sf.khepin.com/2012/02/symfony2-testing-with-php-unit-quick-tip/
      */
     if ($this->em) {
         $this->em->getConnection()->close();
     }
     $this->em = null;
     $this->client = null;
     $this->router = null;
     $this->factoryGirl = null;
     $this->dispatcher = null;
     parent::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();
     }
     // the following helps to free memory and speed up test suite execution.
     // see 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);
         }
     }
     parent::tearDown();
 }
Ejemplo n.º 18
0
 /**
  * Tear down.
  */
 protected function tearDown()
 {
     try {
         $this->_deleteDomain($this->_domain);
     } catch (\Exception $e) {
         var_dump($e->getMessage());
     }
     parent::tearDown();
 }
Ejemplo n.º 19
0
 protected function tearDown()
 {
     parent::tearDown();
     $fs = new Filesystem();
     $fs->remove(sys_get_temp_dir() . '/JMSI18nRoutingBundle');
 }
Ejemplo n.º 20
0
 /**
  * Cleans up the environment after running a test.
  */
 protected function tearDown()
 {
     $this->frame = null;
     parent::tearDown();
 }
Ejemplo n.º 21
0
 /**
  * Tear down.
  */
 protected function tearDown()
 {
     parent::tearDown();
     $fs = new Filesystem();
     $fs->remove($this->_getTestPath());
 }
Ejemplo n.º 22
0
 /**
  * Tear down.
  */
 protected function tearDown()
 {
     parent::tearDown();
     $this->_testEntity = null;
 }
 protected function tearDown()
 {
     parent::tearDown();
 }
Ejemplo n.º 24
0
 protected function tearDown()
 {
     $this->adwords = null;
     $this->client = null;
     parent::tearDown();
 }
Ejemplo n.º 25
0
 protected function tearDown()
 {
     parent::tearDown();
     $fs = new Filesystem();
     $fs->remove(sys_get_temp_dir() . '/JMSSecurityExtraBundle');
 }
Ejemplo n.º 26
0
 public function tearDown()
 {
     parent::tearDown();
     $this->restoreDatabase();
 }
Ejemplo n.º 27
0
 public function tearDown()
 {
     parent::tearDown();
     $this->tearDownCallableComparator();
 }
 /**
  * {@inheritDoc}
  */
 protected function tearDown()
 {
     parent::tearDown();
     //$this->em->close();
 }
Ejemplo n.º 29
0
 /**
  * tear down
  */
 public function tearDown()
 {
     parent::tearDown();
     $this->em->close();
 }
Ejemplo n.º 30
0
 public function tearDown()
 {
     parent::tearDown();
     print "\n";
 }