Skip to content

Commit

Permalink
Because group toggles should be handled the same as user toggles in t…
Browse files Browse the repository at this point in the history
…his scenario (#16)
  • Loading branch information
Craig J. Bass committed Jun 9, 2016
1 parent 98c84eb commit 889f685
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 16 deletions.
5 changes: 0 additions & 5 deletions src/Toggle/CanDefaultToggleStatusBeOverruled.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,6 @@ public function canBeOverruled( $toggleName, array $segments )
return false;
}

$isGroupToggle = $this->toggleGateway->isGroupToggle( $toggleName );
if ( $isGroupToggle ) {
return true;
}

$lockedSegments = $this->segmentLockedPropertyFilter->filterLockedSegments( $segments );
$lockedSegmentPolicyResult = $this->segmentPolicyEvaluator->evaluateSegmentPoliciesForToggle( $toggleName, $lockedSegments );
return $lockedSegmentPolicyResult === null;
Expand Down
11 changes: 0 additions & 11 deletions test/Toggle/CanDefaultToggleStatusBeOverruledTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,17 +101,6 @@ public function GivenSegmentPolicySetForLockedSegment_ExpectFalse()
$this->assertCannotBeOverruledGivenSegments( $segments );
}

/**
* @test
*/
public function GivenGroupToggleAndLockedSegment_ExpectTrue()
{
$segments = [ new SegmentStub( 1, 1, true ) ];
$this->toggleGatewayMock->setIsGroupToggle( self::TOGGLE_NAME, true );
$this->segmentTogglePolicyGatewayMock->setTogglePolicyDisabled( self::TOGGLE_NAME, $segments[0] );
$this->assertCanBeOverruledGivenSegments( $segments );
}

/**
* @test
*/
Expand Down

0 comments on commit 889f685

Please sign in to comment.