public function testUInt16OutsideBuffer() { $this->resource = fopen(tempnam(sys_get_temp_dir(), 'binary'), 'a+'); $stream = new Stream($this->resource); $stream->writeUInt16(65536); $stream->setPosition(0); $this->assertEquals(0, $stream->readUInt16()); }