public function testActivatingAFeatureForAGroupAsAString() { $this->rollout->defineGroup('admins', function (RolloutUserInterface $user) { return $user->getRolloutIdentifier() == 5; }); $this->rollout->activateGroup('chat', 'admins'); // the feature is active for users for which the block is true $this->assertTrue($this->rollout->isActive('chat', new RolloutUser(5))); // the feature is not active for users for which the block evaluates to false $this->assertFalse($this->rollout->isActive('chat', new RolloutUser(1))); }