pull/661/head
Arshid 2 weeks ago
parent f0dc1b1adf
commit 3884da4bdc

@ -128,7 +128,9 @@ class PdoWrapperTest extends TestCase
// Testing protected method using reflection // Testing protected method using reflection
$reflection = new ReflectionClass($this->pdo_wrapper); $reflection = new ReflectionClass($this->pdo_wrapper);
$method = $reflection->getMethod('pullDataFromDsn'); $method = $reflection->getMethod('pullDataFromDsn');
$method->setAccessible(true); if (PHP_VERSION_ID < 80100) {
$method->setAccessible(true);
}
// Test SQLite DSN // Test SQLite DSN
$sqliteDsn = 'sqlite::memory:'; $sqliteDsn = 'sqlite::memory:';
@ -205,7 +207,9 @@ class PdoWrapperTest extends TestCase
// Verify metrics are reset after logging // Verify metrics are reset after logging
$reflection = new ReflectionClass($trackingPdo); $reflection = new ReflectionClass($trackingPdo);
$property = $reflection->getProperty('queryMetrics'); $property = $reflection->getProperty('queryMetrics');
$property->setAccessible(true); if (PHP_VERSION_ID < 80100) {
$property->setAccessible(true);
}
$this->assertCount(0, $property->getValue($trackingPdo)); $this->assertCount(0, $property->getValue($trackingPdo));
} }
} }

Loading…
Cancel
Save