public function testDeactivatingAGroup() { $this->rollout->defineGroup('fivesonly', function (RolloutUserInterface $user) { return $user->getRolloutIdentifier() == 5; }); $this->rollout->activateGroup('chat', 'all'); $this->rollout->activateGroup('chat', 'some'); $this->rollout->activateGroup('chat', 'fivesonly'); $this->rollout->deactivateGroup('chat', 'all'); $this->rollout->deactivateGroup('chat', 'some'); // deactivates the rules for that group $this->assertFalse($this->rollout->isActive('chat', new RolloutUser(10))); // leaves the other groups active $this->assertContains('fivesonly', $this->rollout->get('chat')->getGroups()); $this->assertCount(1, $this->rollout->get('chat')->getGroups()); }