Advertisement
Guest User

Untitled

a guest
May 29th, 2015
243
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. ....
  2.  
  3. public function tearDown() {
  4. if (!$this->persistenceManager instanceof \TYPO3\Flow\Persistence\PersistenceManagerInterface){
  5. $this->persistenceManager = $this->objectManager->get('TYPO3\Flow\Persistence\PersistenceManagerInterface');
  6. };
  7. if (!$this->playerRepository instanceof \TomasNorre\GolfnetInvitational\Domain\Repository\PlayerRepository){
  8. $this->playerRepository = $this->objectManager->get('TomasNorre\GolfnetInvitational\Domain\Repository\PlayerRepository');
  9. };
  10. $this->playerRepository->removeAll();
  11. $this->persistenceManager->persistAll();
  12. unset($this->playerRepository);
  13. unset($this->persistenceManager);
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement