Example #1
0
 protected function tearDown()
 {
     parent::tearDown();
     $tool = new SchemaTool($this->em);
     $tool->dropDatabase();
     unset($this->em);
 }
 public function tearDown()
 {
     if ($this->db instanceof \MongoDB) {
         $this->db->drop();
     }
     parent::tearDown();
 }
Example #3
0
 public function tearDown()
 {
     $this->sessionProgress->getManager()->getStorage()->clear('progress_tracker');
     $forms = new Container('forms');
     $forms->getManager()->getStorage()->clear('forms');
     parent::tearDown();
 }
 protected function tearDown()
 {
     foreach ($this->httpMocks as $mock) {
         $mock->verify();
     }
     parent::tearDown();
     M::close();
 }
 /**
  * @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();
 }
    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());
    }
 /**
  * Cleans up the environment after running a test.
  */
 protected function tearDown()
 {
     // TODO Auto-generated IndexControllerTest::tearDown()
     $this->indexController = null;
     parent::tearDown();
 }
 public function tearDown()
 {
     unset($_SERVER['HTTP_X_REQUEST_ID']);
     return parent::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);
 }
 protected function tearDown()
 {
     parent::tearDown();
 }
 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');
 }
 /**
  * Cleans up the environment after running a test.
  */
 protected function tearDown()
 {
     // TODO Auto-generated AccountControllerTest::tearDown()
     $this->accountController = null;
     parent::tearDown();
 }
 protected function tearDown()
 {
     parent::tearDown();
     $this->dropDatabase();
 }