diff --git a/src/Stream/StringStream.php b/src/Stream/StringStream.php new file mode 100644 index 0000000..5a4235a --- /dev/null +++ b/src/Stream/StringStream.php @@ -0,0 +1,13 @@ +assertNotNull($stream); + } + + public function testCreatesInstanceWithString() + { + $message = "Hello, World!"; + $stream = new StringStream($message); + $this->assertEquals($message, (string) $stream); + } + + public function testAllowsWriting() + { + $message = "Hello, World!"; + $stream = new StringStream(); + $stream->write("Hello,"); + $stream->write(" World!"); + $this->assertEquals($message, (string) $stream); + } +}