/**
  * @test
  */
 public function setNameForStringSetsName()
 {
     $this->subject->setName('Conceived at T3CON10');
     $this->assertAttributeEquals('Conceived at T3CON10', 'name', $this->subject);
 }
 /**
  * action update
  * @param \MUM\BjrFreizeit\Domain\Model\TargetGroup $targetGroup
  * @return void
  *
  */
 public function updateAction(\MUM\BjrFreizeit\Domain\Model\TargetGroup $targetGroup)
 {
     $redirectParams = array();
     $args = $this->request->getArguments();
     if ($targetGroup->_isNew() || $targetGroup->_isDirty()) {
         if ($targetGroup->_isNew()) {
             $targetGroup->setPid($this->settings['pidOrganizationFolder']);
             $this->targetGroupRepository->add($targetGroup);
             //it is not persistent already, we have to do it!
             $persistenceManager = $this->objectManager->get('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\PersistenceManager');
             $persistenceManager->persistAll();
             //now organization ist persistent
             $GLOBALS['TSFE']->fe_user->setKey("ses", "targetGroupChange", 'Die Zielgruppe <strong>' . $targetGroup->getName() . '</strong> wurde neu angelegt.');
         } else {
             $this->targetGroupRepository->update($targetGroup);
             $GLOBALS['TSFE']->fe_user->setKey("ses", "targetGroupChange", 'Die Zielgruppe <strong>' . $targetGroup->getName() . '</strong> wurde geändert.');
         }
     }
     $redirectParams['targetGroup'] = $targetGroup;
     $this->redirect('successUpdate', 'TargetGroup', NULL, $redirectParams);
 }