Skip to content

Commit 3884da4

Browse files
ArshidArshid
authored andcommitted
php85
1 parent f0dc1b1 commit 3884da4

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

tests/PdoWrapperTest.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,9 @@ public function testPullDataFromDsn(): void
128128
// Testing protected method using reflection
129129
$reflection = new ReflectionClass($this->pdo_wrapper);
130130
$method = $reflection->getMethod('pullDataFromDsn');
131-
$method->setAccessible(true);
131+
if (PHP_VERSION_ID < 80100) {
132+
$method->setAccessible(true);
133+
}
132134

133135
// Test SQLite DSN
134136
$sqliteDsn = 'sqlite::memory:';
@@ -205,7 +207,9 @@ public function testLogQueries(): void
205207
// Verify metrics are reset after logging
206208
$reflection = new ReflectionClass($trackingPdo);
207209
$property = $reflection->getProperty('queryMetrics');
208-
$property->setAccessible(true);
210+
if (PHP_VERSION_ID < 80100) {
211+
$property->setAccessible(true);
212+
}
209213
$this->assertCount(0, $property->getValue($trackingPdo));
210214
}
211215
}

0 commit comments

Comments
 (0)