Skip to content

Commit 73797d6

Browse files
committed
Add tests for selectStream and selectStreamWithParams
https://claude.ai/code/session_01YX19TXMGf89gacogUmxHJM
1 parent 3926932 commit 73797d6

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

tests/Client/SelectTest.php

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,24 @@ public function testNull(): void
164164
self::assertTrue(true);
165165
}
166166

167+
public function testSelectStream(): void
168+
{
169+
$stream = self::$client->selectStream('SELECT 1 AS data', new TabSeparated());
170+
171+
self::assertSame("1\n", $stream->__toString());
172+
}
173+
174+
public function testSelectStreamWithParams(): void
175+
{
176+
$stream = self::$client->selectStreamWithParams(
177+
'SELECT {p1:UInt8} AS data',
178+
['p1' => 3],
179+
new TabSeparated(),
180+
);
181+
182+
self::assertSame("3\n", $stream->__toString());
183+
}
184+
167185
public function testSettingsArePassed(): void
168186
{
169187
self::expectException(ServerError::class);

0 commit comments

Comments
 (0)