protected function tearDown()
 {
     parent::tearDown();
     RootlineUtility::purgeCaches();
 }
示例#2
0
 /**
  * Deletes all dummy records that have been added through this framework.
  * For this, all records with the "is_dummy_record" flag set to 1 will be
  * deleted from all tables that have been used within this instance of the
  * testing framework.
  *
  * If you set $performDeepCleanUp to TRUE, it will go through ALL tables to
  * which the current instance of the testing framework has access. Please
  * consider well, whether you want to do this as it's a huge performance
  * issue.
  *
  * @param bool $performDeepCleanUp
  *        whether a deep clean up should be performed
  *
  * @return void
  *
  * @throws Exception
  */
 public function cleanUp($performDeepCleanUp = FALSE)
 {
     $this->cleanUpTableSet(FALSE, $performDeepCleanUp);
     $this->cleanUpTableSet(TRUE, $performDeepCleanUp);
     $this->deleteAllDummyFoldersAndFiles();
     $this->discardFakeFrontEnd();
     foreach ($this->getHooks() as $hook) {
         if (!$hook instanceof Tx_Phpunit_Interface_FrameworkCleanupHook) {
             throw new Exception('The class ' . get_class($hook) . ' must implement Tx_Phpunit_Interface_FrameworkCleanupHook.', 1299257923);
         }
         /** @var $hook Tx_Phpunit_Interface_FrameworkCleanupHook */
         $hook->cleanUp();
     }
     RootlineUtility::purgeCaches();
 }
示例#3
0
 /**
  * Deletes all dummy records that have been added through this framework.
  * For this, all records with the "is_dummy_record" flag set to 1 will be
  * deleted from all tables that have been used within this instance of the
  * testing framework.
  *
  * If you set $performDeepCleanUp to TRUE, it will go through ALL tables to
  * which the current instance of the testing framework has access. Please
  * consider well, whether you want to do this as it's a huge performance
  * issue.
  *
  * @param bool $performDeepCleanUp whether a deep clean up should be performed, may be empty
  *
  * @return void
  */
 public function cleanUp($performDeepCleanUp = FALSE)
 {
     $this->cleanUpTableSet(FALSE, $performDeepCleanUp);
     $this->cleanUpTableSet(TRUE, $performDeepCleanUp);
     $this->deleteAllDummyFoldersAndFiles();
     $this->discardFakeFrontEnd();
     foreach ($this->getHooks() as $hook) {
         if (method_exists($hook, 'cleanUp')) {
             $hook->cleanUp($this);
         }
     }
     \TYPO3\CMS\Core\Utility\RootlineUtility::purgeCaches();
 }