/** * {@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; }
/** * {@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); } }
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(); }
public function tearDown() { NullPersister::$incrementTotalAccessCalled = false; NullPersister::$incrementRepositoryAccessCalled = false; NullPersister::$addRepositoryToLatestAccessedCalled = false; NullPersister::$incrementRepositoryAccessTypeCalled = false; parent::tearDown(); }
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; }
/** * {@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(); }
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(); }
/** * Tear down. */ protected function tearDown() { try { $this->_deleteDomain($this->_domain); } catch (\Exception $e) { var_dump($e->getMessage()); } parent::tearDown(); }
protected function tearDown() { parent::tearDown(); $fs = new Filesystem(); $fs->remove(sys_get_temp_dir() . '/JMSI18nRoutingBundle'); }
/** * Cleans up the environment after running a test. */ protected function tearDown() { $this->frame = null; parent::tearDown(); }
/** * Tear down. */ protected function tearDown() { parent::tearDown(); $fs = new Filesystem(); $fs->remove($this->_getTestPath()); }
/** * Tear down. */ protected function tearDown() { parent::tearDown(); $this->_testEntity = null; }
protected function tearDown() { parent::tearDown(); }
protected function tearDown() { $this->adwords = null; $this->client = null; parent::tearDown(); }
protected function tearDown() { parent::tearDown(); $fs = new Filesystem(); $fs->remove(sys_get_temp_dir() . '/JMSSecurityExtraBundle'); }
public function tearDown() { parent::tearDown(); $this->restoreDatabase(); }
public function tearDown() { parent::tearDown(); $this->tearDownCallableComparator(); }
/** * {@inheritDoc} */ protected function tearDown() { parent::tearDown(); //$this->em->close(); }
/** * tear down */ public function tearDown() { parent::tearDown(); $this->em->close(); }
public function tearDown() { parent::tearDown(); print "\n"; }