Skip to content

Commit

Permalink
Drop ReflectionProperty::setAccessible
Browse files Browse the repository at this point in the history
Signed-off-by: Nathanael Esayeas <[email protected]>
  • Loading branch information
ghostwriter committed Dec 19, 2022
1 parent 2a02960 commit 88794e9
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions test/unit/Changelog/ChangelogReleaseNotesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -156,12 +156,9 @@ public function testMergedInstanceContainsChangelogEntryFromTheInstanceThatHadOn
): void {
$merged = $original->merge($secondary);

$r = new ReflectionProperty($merged, 'changelogEntry');
/** @psalm-suppress UnusedMethodCall */
$r->setAccessible(true);

$reflectionProperty = new ReflectionProperty($merged, 'changelogEntry');
// Equals, but not same, as the class stores a clone of the original.
$this->assertEquals($expectedEntry, $r->getValue($merged));
$this->assertEquals($expectedEntry, $reflectionProperty->getValue($merged));
}

private const CHANGELOG_ENTRY = <<< 'ENTRY'
Expand Down

0 comments on commit 88794e9

Please sign in to comment.