/** * @test */ public function allSubGroupsCanBeRemoved() { $group1 = new \TYPO3\CMS\Extbase\Domain\Model\BackendUserGroup(); $group1->setTitle('foo'); $group2 = new \TYPO3\CMS\Extbase\Domain\Model\BackendUserGroup(); $group2->setTitle('bar'); $this->subject->addSubGroup($group1); $this->subject->addSubGroup($group2); $this->subject->removeAllSubGroups(); $this->assertEquals(count($this->subject->getSubGroups()), 0); }