diff --git a/src/Exception/InvalidStrategyTypeGiven.php b/src/Exception/InvalidStrategyTypeGiven.php index 3078ea1..43cd55e 100644 --- a/src/Exception/InvalidStrategyTypeGiven.php +++ b/src/Exception/InvalidStrategyTypeGiven.php @@ -8,7 +8,6 @@ final class InvalidStrategyTypeGiven extends InvalidArgumentException { - public static function withType(string $strategyType): self { return new self(sprintf('Unknown toggle strategy type %s given.', $strategyType)); diff --git a/test/Read/ChainFeatureFinderTest.php b/test/Read/ChainFeatureFinderTest.php index 01a8eb5..653f3ea 100644 --- a/test/Read/ChainFeatureFinderTest.php +++ b/test/Read/ChainFeatureFinderTest.php @@ -63,7 +63,7 @@ public function testItShouldGetTheFeatureByFeatureIdFromTheFirstFinder(): void $actual = $chain->get(self::FEATURE_ID); - self::assertSame($expectedFeature, $actual); + $this->assertSame($expectedFeature, $actual); } public function testItShouldGetTheFeatureByFeatureIdFromTheSecondFinder(): void @@ -89,7 +89,7 @@ public function testItShouldGetTheFeatureByFeatureIdFromTheSecondFinder(): void $actual = $chain->get(self::FEATURE_ID); - self::assertSame($expectedFeature, $actual); + $this->assertSame($expectedFeature, $actual); } public function testItShouldReturnAllFeaturesFromAllFinders(): void @@ -125,7 +125,7 @@ public function testItShouldReturnAllFeaturesFromAllFinders(): void $actual = $chain->all(); - self::assertCount(count($expectedFeatures), $actual); + $this->assertCount(count($expectedFeatures), $actual); } public function testItShouldReturnAllFeaturesFromAllFindersWithoutRepeatingItems(): void @@ -161,7 +161,7 @@ public function testItShouldReturnAllFeaturesFromAllFindersWithoutRepeatingItems $actual = $chain->all(); - self::assertCount(count($expectedFeatures), $actual); + $this->assertCount(count($expectedFeatures), $actual); } public function testItShouldReturnAllFeaturesFromAllFindersOrderedByFirstFinderFirst(): void @@ -197,7 +197,7 @@ public function testItShouldReturnAllFeaturesFromAllFindersOrderedByFirstFinderF $actual = $chain->all(); - self::assertSame($expectedFeatures, $actual); + $this->assertSame($expectedFeatures, $actual); } public function testItShouldReturnAnEmptyArrayIfNoFeaturesFoundInFinders(): void @@ -221,6 +221,6 @@ public function testItShouldReturnAnEmptyArrayIfNoFeaturesFoundInFinders(): void $actual = $chain->all(); - self::assertSame([], $actual); + $this->assertSame([], $actual); } } diff --git a/test/Read/ChainSegmentFactoryTest.php b/test/Read/ChainSegmentFactoryTest.php index 8c2a77f..f0531f0 100644 --- a/test/Read/ChainSegmentFactoryTest.php +++ b/test/Read/ChainSegmentFactoryTest.php @@ -42,7 +42,7 @@ public function testItShouldBeCreatedWithAtLeastOneSegmentFactoryInstance(): voi $current = $chainSegmentFactory->create(self::SEGMENT_ID, self::SEGMENT_TYPE, self::PAYLOAD); - self::assertSame($expectedSegment, $current); - self::assertSame([self::SEGMENT_TYPE], $chainSegmentFactory->types()); + $this->assertSame($expectedSegment, $current); + $this->assertSame([self::SEGMENT_TYPE], $chainSegmentFactory->types()); } } diff --git a/test/Read/ChainToggleStrategyFactoryTest.php b/test/Read/ChainToggleStrategyFactoryTest.php index 9b0be7d..839c902 100644 --- a/test/Read/ChainToggleStrategyFactoryTest.php +++ b/test/Read/ChainToggleStrategyFactoryTest.php @@ -63,8 +63,8 @@ public function testItShouldBeCreatedWithAtLeastOneToggleStrategyFactoryInstance 'segments' => [] ]); - self::assertSame($expectedStrategy, $current); - self::assertSame([self::STRATEGY_TYPE], $chainToggleStrategyFactory->types()); + $this->assertSame($expectedStrategy, $current); + $this->assertSame([self::STRATEGY_TYPE], $chainToggleStrategyFactory->types()); } public function testItShouldBeCreatedWithAtLeastOneToggleStrategyFactoryInstanceAndSegments(): void @@ -91,8 +91,7 @@ public function testItShouldBeCreatedWithAtLeastOneToggleStrategyFactoryInstance 'segments' => self::SEGMENTS ]); - self::assertSame($expectedStrategy, $current); - self::assertSame([self::STRATEGY_TYPE, 'other_type'], $chainToggleStrategyFactory->types()); + $this->assertSame($expectedStrategy, $current); + $this->assertSame([self::STRATEGY_TYPE, 'other_type'], $chainToggleStrategyFactory->types()); } } - \ No newline at end of file