Skip to content

Commit

Permalink
Merge 13fb298 into fb202fa
Browse files Browse the repository at this point in the history
  • Loading branch information
peter279k committed Apr 27, 2023
2 parents fb202fa + 13fb298 commit 0a5eb10
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions tests/unit/ObjectAccess/GetPropertyValueTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public function testFromStdClassSuccess(stdClass $input, string $key, $expected)
$result = ObjectAccess::getPropertyValue($input, $key);

// Then
$this->assertEquals($expected, $result);
$this->assertSame($expected, $result);
}

public function fromStdClassSuccessDataProvider(): array
Expand Down Expand Up @@ -52,7 +52,7 @@ public function testFromStdClassFail(stdClass $input, string $key): void
$this->fail();
} catch(KeyError $e) {
// Then
$this->assertEquals("property ".get_class($input)."::{$key} is not readable", $e->getMessage());
$this->assertSame("property ".get_class($input)."::{$key} is not readable", $e->getMessage());
}
}

Expand Down Expand Up @@ -93,7 +93,7 @@ public function testFromObjectSuccess(object $input, string $key, $expected): vo
$result = ObjectAccess::getPropertyValue($input, $key);

// Then
$this->assertEquals($expected, $result);
$this->assertSame($expected, $result);
}

public function fromObjectSuccessDataProvider(): array
Expand Down Expand Up @@ -124,7 +124,7 @@ public function testFromObjectFail(object $input, string $key): void
$this->fail();
} catch(KeyError $e) {
// Then
$this->assertEquals("property ".get_class($input)."::{$key} is not readable", $e->getMessage());
$this->assertSame("property ".get_class($input)."::{$key} is not readable", $e->getMessage());
}
}

Expand Down
6 changes: 3 additions & 3 deletions tests/unit/ObjectAccess/SetPropertyValueTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public function testToStdClass(stdClass $input, string $key, $value): void

// Then
$result = ObjectAccess::getPropertyValue($input, $key);
$this->assertEquals($value, $result);
$this->assertSame($value, $result);
}

public function toStdClassDataProvider(): array
Expand Down Expand Up @@ -69,7 +69,7 @@ public function testToObjectSuccess(object $input, string $key, $value): void

// Then
$result = ObjectAccess::getPropertyValue($input, $key);
$this->assertEquals($value, $result);
$this->assertSame($value, $result);
}

public function toObjectSuccessDataProvider(): array
Expand Down Expand Up @@ -97,7 +97,7 @@ public function testToObjectFail(object $input, string $key, $value): void
$this->fail();
} catch(Error $e) {
// Then
$this->assertEquals("property ".get_class($input)."::{$key} is not writable", $e->getMessage());
$this->assertSame("property ".get_class($input)."::{$key} is not writable", $e->getMessage());
}
}

Expand Down
4 changes: 2 additions & 2 deletions tests/unit/ObjectTypeCaster/ObjectTypeCasterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public function testFailNotRelatives(object $sourceObject, string $destinationCl
$this->fail();
} catch(\TypeError $e) {
// Then
$this->assertEquals(
$this->assertSame(
"Classes '".get_class($sourceObject)."' and '{$destinationClass}' must be relatives",
$e->getMessage()
);
Expand Down Expand Up @@ -121,7 +121,7 @@ public function testFailNotExist(object $sourceObject, string $destinationClass)
$this->fail();
} catch(\TypeError $e) {
// Then
$this->assertEquals("Class '{$destinationClass}' does not exist", $e->getMessage());
$this->assertSame("Class '{$destinationClass}' does not exist", $e->getMessage());
}
}

Expand Down

0 comments on commit 0a5eb10

Please sign in to comment.