public function testString() { $this->resource = fopen(tempnam(sys_get_temp_dir(), 'binary'), 'a+'); $stream = new Stream($this->resource); $stream->writeString('Hello World'); $stream->setPosition(0); $this->assertEquals('Hello World', $stream->readString(11)); }