/**
  * Removes stuff created in setUp().
  */
 protected function tearDown()
 {
     $sectionHandler = $this->persistenceHandler->sectionHandler();
     // Removing default objects as well as those created by
     try {
         $sectionHandler->delete(2);
         $sectionHandler->delete(3);
     } catch (NotFound $e) {
     }
     parent::tearDown();
 }
 protected function tearDown()
 {
     $contentHandler = $this->persistenceHandler->contentHandler();
     try {
         // Removing default objects as well as those created by tests
         foreach ($this->contentToDelete as $content) {
             $contentHandler->deleteContent($content->versionInfo->contentInfo->id);
         }
     } catch (NotFound $e) {
     }
     unset($this->contentId);
     $contentTypeHandler = $this->persistenceHandler->contentTypeHandler();
     foreach ($this->contentTypeToDelete as $type) {
         try {
             $contentTypeHandler->delete($type->id, $type->status);
         } catch (NotFound $e) {
         }
     }
     parent::tearDown();
 }
 /**
  * Setup the SectionHandlerTest.
  */
 protected function setUp()
 {
     parent::setUp();
     $this->handler = $this->persistenceHandler->contentLanguageHandler();
 }
 /**
  * Setup the SectionHandlerTest.
  */
 protected function setUp()
 {
     parent::setUp();
     $this->handler = $this->persistenceHandler->objectStateHandler();
 }
 /**
  * Removes stuff created in setUp().
  */
 protected function tearDown()
 {
     $this->trashHandler->emptyTrash();
     $this->trashHandler = null;
     $locationHandler = $this->persistenceHandler->locationHandler();
     // Removing default objects as well as those created by tests
     foreach ($this->locationToDelete as $location) {
         try {
             $locationHandler->removeSubtree($location->id);
         } catch (NotFound $e) {
         }
     }
     $contentHandler = $this->persistenceHandler->contentHandler();
     foreach ($this->contentToDelete as $content) {
         try {
             $contentHandler->deleteContent($content->versionInfo->contentInfo->id);
         } catch (NotFound $e) {
         }
     }
     $contentTypeHandler = $this->persistenceHandler->contentTypeHandler();
     foreach ($this->contentTypeToDelete as $type) {
         try {
             $contentTypeHandler->delete($type->id, $type->status);
         } catch (NotFound $e) {
         }
     }
     unset($this->lastLocationId, $this->lastContentId);
     parent::tearDown();
 }