function testRangeStream() { $stream = fopen('php://memory', 'r+'); fwrite($stream, "222"); rewind($stream); $file = new File(SABRE_TEMPDIR . '/file.txt'); $file->put('0000000'); $file->patch($stream, 2, 3); $this->assertEquals('0002220', file_get_contents(SABRE_TEMPDIR . '/file.txt')); }