Skip to content

Commit 88794e9

Browse files
committed
Drop ReflectionProperty::setAccessible
Signed-off-by: Nathanael Esayeas <nathanael.esayeas@protonmail.com>
1 parent 2a02960 commit 88794e9

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

test/unit/Changelog/ChangelogReleaseNotesTest.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -156,12 +156,9 @@ public function testMergedInstanceContainsChangelogEntryFromTheInstanceThatHadOn
156156
): void {
157157
$merged = $original->merge($secondary);
158158

159-
$r = new ReflectionProperty($merged, 'changelogEntry');
160-
/** @psalm-suppress UnusedMethodCall */
161-
$r->setAccessible(true);
162-
159+
$reflectionProperty = new ReflectionProperty($merged, 'changelogEntry');
163160
// Equals, but not same, as the class stores a clone of the original.
164-
$this->assertEquals($expectedEntry, $r->getValue($merged));
161+
$this->assertEquals($expectedEntry, $reflectionProperty->getValue($merged));
165162
}
166163

167164
private const CHANGELOG_ENTRY = <<< 'ENTRY'

0 commit comments

Comments
 (0)