public static function create(UrlScript $url = NULL, $method = 'GET') { $url = $url ?: new UrlScript('http://localhost/'); $presenter = new self(); $rc = $presenter->getReflection()->getParentClass(); $rp = $rc->getProperty('httpResponse'); $rp->setAccessible(TRUE); $rp->setValue($presenter, new HttpResponseMock()); $rp = $rc->getProperty('httpRequest'); $rp->setAccessible(TRUE); $rp->setValue($presenter, new Request($url, NULL, NULL, NULL, NULL, NULL, $method, NULL, NULL)); return $presenter; }