Skip to content

Commit a3c98cd

Browse files
committed
STDIN is now seekable #572
1 parent 02d43ac commit a3c98cd

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/StreamTest.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,14 +167,19 @@ public function testRewindThrowsException(): void
167167
{
168168
$this->expectException(UnavailableFeature::class);
169169

170-
$stream = Stream::from(STDIN);
170+
/** @var resource $filePointer */
171+
$filePointer = fopen('php://stdin', 'r');
172+
$stream = Stream::from($filePointer);
171173
$stream->rewind();
172174
}
173175

174176
public function testCreateStreamWithNonSeekableStream(): void
175177
{
176178
$this->expectException(UnavailableFeature::class);
177-
$stream = Stream::from(STDIN);
179+
180+
/** @var resource $filePointer */
181+
$filePointer = fopen('php://stdin', 'r');
182+
$stream = Stream::from($filePointer);
178183
$stream->seek(3);
179184
}
180185

0 commit comments

Comments
 (0)