Skip to content

Commit

Permalink
[#15] update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kpicaza committed Oct 2, 2021
1 parent 55c9c39 commit e2efb7c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/Write/FeatureTest.php
Expand Up @@ -47,6 +47,8 @@ public function testItShouldBeEnabled(): void
$this->assertFalse($feature->isEnabled());
$feature->enable();
$this->assertTrue($feature->isEnabled());
$events = $feature->release();
$this->assertCount(0, $events);
}

public function testItShouldBeDisabled(): void
Expand All @@ -55,12 +57,16 @@ public function testItShouldBeDisabled(): void
$this->assertTrue($feature->isEnabled());
$feature->disable();
$this->assertFalse($feature->isEnabled());
$events = $feature->release();
$this->assertCount(0, $events);
}

public function testItShouldHaveAddedStrategies(): void
{
$feature = $this->getFeatureWithAnStrategy();
$this->assertCount(1, $feature->strategies());
$events = $feature->release();
$this->assertCount(0, $events);
}

public function testItShouldRemoveAddedStrategies(): void
Expand All @@ -70,6 +76,8 @@ public function testItShouldRemoveAddedStrategies(): void

$feature->removeStrategy(StrategyId::fromString(self::STRATEGY_ID));
$this->assertCount(0, $feature->strategies());
$events = $feature->release();
$this->assertCount(0, $events);
}

private function createFeature(): Feature
Expand Down

0 comments on commit e2efb7c

Please sign in to comment.