/** * Get spoofed request class instance * * @param string $url * @param string $method * @param array $post * @return \Arvici\Heart\Http\Request */ private function spoofedRequest($url, $method = 'get', $post = array()) { TestUtils::clear(); //$url = '/get/test?param1=1¶m2=yes¶m3[]=1¶m3[]=2¶m3[]=3'; $urlparts = parse_url($url); parse_str($urlparts['query'], $get); TestUtils::spoofUrl($url, $method, $get, $post); return Http::getInstance()->request(); }
private function spoof($url, $method, $get = array(), $post = array()) { TestUtils::spoofUrl($url, $method, $get, $post); }