assertTrue($state->isEnforced()); } public function testGetEnforcedGroups() { $state = new EnforcementState(true, ['twofactorers']); $this->assertEquals(['twofactorers'], $state->getEnforcedGroups()); } public function testGetExcludedGroups() { $state = new EnforcementState(true, [], ['yoloers']); $this->assertEquals(['yoloers'], $state->getExcludedGroups()); } public function testJsonSerialize() { $state = new EnforcementState(true, ['twofactorers'], ['yoloers']); $expected = [ 'enforced' => true, 'enforcedGroups' => ['twofactorers'], 'excludedGroups' => ['yoloers'], ]; $json = $state->jsonSerialize(); $this->assertEquals($expected, $json); } }