getInput(); } public function testParseAttributes(){ $input = <<test1

------WebKitFormBoundarySPB0RLYHwOEptxHU Content-Disposition: form-data; name="featured" false ------WebKitFormBoundarySPB0RLYHwOEptxHU Content-Disposition: form-data; name="display_on_site" false ------WebKitFormBoundarySPB0RLYHwOEptxHU Content-Disposition: form-data; name="link" https://www.google.com ------WebKitFormBoundarySPB0RLYHwOEptxHU-- DATA; $_SERVER['CONTENT_TYPE'] = 'multipart/form-data; boundary=----WebKitFormBoundarySPB0RLYHwOEptxHU'; $parser = new \utils\ParseMultiPartFormDataInputStream($input); $res = $parser->getInput(); $this->assertTrue(isset($res['parameters'])); $this->assertTrue(count($res['parameters']) > 0); } }