Skip to content

Commit

Permalink
Coding style via PHP_CodeSniffer & assertion call
Browse files Browse the repository at this point in the history
  • Loading branch information
peter279k authored and kpicaza committed Jul 25, 2022
1 parent 661b67c commit 3b82305
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 14 deletions.
1 change: 0 additions & 1 deletion src/Exception/InvalidStrategyTypeGiven.php
Expand Up @@ -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));
Expand Down
12 changes: 6 additions & 6 deletions test/Read/ChainFeatureFinderTest.php
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -161,7 +161,7 @@ public function testItShouldReturnAllFeaturesFromAllFindersWithoutRepeatingItems

$actual = $chain->all();

self::assertCount(count($expectedFeatures), $actual);
$this->assertCount(count($expectedFeatures), $actual);
}

public function testItShouldReturnAllFeaturesFromAllFindersOrderedByFirstFinderFirst(): void
Expand Down Expand Up @@ -197,7 +197,7 @@ public function testItShouldReturnAllFeaturesFromAllFindersOrderedByFirstFinderF

$actual = $chain->all();

self::assertSame($expectedFeatures, $actual);
$this->assertSame($expectedFeatures, $actual);
}

public function testItShouldReturnAnEmptyArrayIfNoFeaturesFoundInFinders(): void
Expand All @@ -221,6 +221,6 @@ public function testItShouldReturnAnEmptyArrayIfNoFeaturesFoundInFinders(): void

$actual = $chain->all();

self::assertSame([], $actual);
$this->assertSame([], $actual);
}
}
4 changes: 2 additions & 2 deletions test/Read/ChainSegmentFactoryTest.php
Expand Up @@ -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());
}
}
9 changes: 4 additions & 5 deletions test/Read/ChainToggleStrategyFactoryTest.php
Expand Up @@ -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
Expand All @@ -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());
}
}

0 comments on commit 3b82305

Please sign in to comment.