Skip to content

Commit f2bdd2c

Browse files
committed
fix: mitigate UndefinedClass
1 parent b9b559f commit f2bdd2c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Instrumentation/PDO/tests/Integration/PDOInstrumentationTest.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ private function createDB(): PDO
2626
return new PDO('sqlite::memory:');
2727
}
2828

29-
private function createDBWithNewSubclass(): PDO\Sqlite
29+
private function createDBWithNewSubclass(): PDO
3030
{
3131
if (!class_exists('Pdo\Sqlite')) {
3232
$this->markTestSkipped('Pdo\Sqlite class is not available in this PHP version');
@@ -81,9 +81,13 @@ public function test_pdo_construct(): void
8181
$this->assertEquals('sqlite', $span->getAttributes()->get(TraceAttributes::DB_SYSTEM_NAME));
8282
}
8383

84+
/**
85+
* @psalm-suppress UndefinedClass
86+
*/
8487
public function test_pdo_sqlite_subclass(): void
8588
{
8689
$this->assertCount(0, $this->storage);
90+
/** @var PDO\Sqlite $db */
8791
$db = self::createDBWithNewSubclass();
8892
$this->assertCount(1, $this->storage);
8993
$span = $this->storage->offsetGet(0);

0 commit comments

Comments
 (0)