assertSame(\STDIN, $stream->getResource()); } public function testNonStream() { $this->expectException(\Error::class); $this->expectExceptionMessage("Expected a valid stream"); new ResourceInputStream(42); } public function testNotReadable() { $this->expectException(\Error::class); $this->expectExceptionMessage("Expected a readable stream"); new ResourceInputStream(\STDOUT); } }