Skip to content

Commit b179bea

Browse files
committed
Improved test
1 parent 6516226 commit b179bea

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/Instrumentation/PostgreSql/tests/Integration/PostgreSqlInstrumentationTest.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -312,8 +312,10 @@ public function test_pg_select(): void
312312
$this->assertSame('pg_connect', $this->storage->offsetGet($offset)->getName());
313313
$offset++;
314314

315-
// Use condition matching one row from init.sql
316-
$conditions = ['email' => '[email protected]'];
315+
$conditions = [
316+
'name' => 'Jane Smith',
317+
'email' => '[email protected]',
318+
];
317319
$result = pg_select($conn, 'users', $conditions);
318320

319321
$this->assertIsArray($result);
@@ -323,7 +325,7 @@ public function test_pg_select(): void
323325
$this->assertAttributes($offset, [
324326
TraceAttributes::DB_OPERATION_NAME => 'SELECT',
325327
TraceAttributes::DB_COLLECTION_NAME => 'users',
326-
TraceAttributes::DB_QUERY_TEXT => "SELECT * FROM users WHERE email = '[email protected]'",
328+
TraceAttributes::DB_QUERY_TEXT => "SELECT * FROM users WHERE name = 'Jane Smith' AND email = '[email protected]'",
327329
]);
328330
$offset++;
329331

0 commit comments

Comments
 (0)