Skip to content

Commit

Permalink
PR review adjustments
Browse files Browse the repository at this point in the history
(-) Remove unnecessary assertion when expected value is null
(-) Remove unused variable when destructuring at the test consumer,
    the array containing test data from the test producer.
  • Loading branch information
marcelo-lipienski authored and flavioheleno committed Jul 13, 2022
1 parent e98eaf8 commit 0b3d163
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions tests/Unit/Domain/Preference/PreferenceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ public function setUp(): void {

public function testIdNotGiven(): void {
$this->assertNull($this->preference->getId());
$this->assertSame(null, $this->preference->getId());
}

public function testIdGiven(): void {
Expand Down Expand Up @@ -118,7 +117,7 @@ public function testValueAsBool(): array {
* @depends testValueAsBool
*/
public function testAsString(array $testData): void {
[$preference, $createdAt] = $testData;
[$preference,] = $testData;

$this->assertIsString($preference->getValueAsString());
}
Expand All @@ -130,7 +129,7 @@ public function testAsString(array $testData): void {
* @depends testValueAsBool
*/
public function testAsInteger(array $testData): void {
[$preference, $createdAt] = $testData;
[$preference,] = $testData;

$this->assertIsInt($preference->getValueAsInteger());
}
Expand All @@ -142,7 +141,7 @@ public function testAsInteger(array $testData): void {
* @depends testValueAsBool
*/
public function testAsFloat(array $testData): void {
[$preference, $createdAt] = $testData;
[$preference,] = $testData;

$this->assertIsFloat($preference->getValueAsFloat());
}
Expand All @@ -154,7 +153,7 @@ public function testAsFloat(array $testData): void {
* @depends testValueAsBool
*/
public function testAsBool(array $test): void {
[$preference, $createdAt] = $test;
[$preference,] = $test;

$this->assertIsBool($preference->getValueAsBool());
}
Expand Down

0 comments on commit 0b3d163

Please sign in to comment.