Esempio n. 1
0
 /**
  * @test
  */
 public function removeUsergroupRemovesUsergroup()
 {
     $usergroup = new \TYPO3\CMS\Extbase\Domain\Model\FrontendUserGroup('foo');
     $this->fixture->addUsergroup($usergroup);
     $this->assertEquals(count($this->fixture->getUsergroup()), 1);
     $this->fixture->removeUsergroup($usergroup);
     $this->assertEquals(count($this->fixture->getUsergroup()), 0);
 }
Esempio n. 2
0
 /**
  * @return ObjectStorage
  */
 public function constructObjectStorageContainingFrontendUsersWithUserGroups()
 {
     $storage = new ObjectStorage();
     $userGroup1 = new FrontendUserGroup('my first group');
     $userGroup2 = new FrontendUserGroup('my second group');
     $user1 = new FrontendUser();
     $user2 = new FrontendUser();
     $user1->addUsergroup($userGroup1);
     $user2->addUsergroup($userGroup2);
     $storage->attach($user1);
     $storage->attach($user2);
     return $storage;
 }