Skip to content

Commit b8eb320

Browse files
Update UriTemplateTest.php
1 parent 8abd4a6 commit b8eb320

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

tests/UriTemplateTest.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,12 +167,16 @@ public function testParsesExpressions(string $exp, array $data): void
167167
{
168168
$template = new UriTemplate();
169169

170-
// Access the config object
171170
$class = new \ReflectionClass($template);
171+
172172
$method = $class->getMethod('parseExpression');
173-
$method->setAccessible(true);
173+
174+
if (PHP_VERSION_ID < 80100) {
175+
$method->setAccessible(true);
176+
}
174177

175178
$exp = \substr($exp, 1, -1);
179+
176180
self::assertSame($data, $method->invokeArgs($template, [$exp]));
177181
}
178182

0 commit comments

Comments
 (0)