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