/**
  * @test
  */
 public function testCanSetHierarchicalFacetValue()
 {
     $testUrl = 'http://google.de/index.php?id=0&tx_aoesolr_pi1%5Baction%5D=search&tx_aoesolr_pi1%5Bcontroller%5D=Search&dataType=html&eID=tx_aoesolr_search&tx_aoesolr_pi1%5Bfacetsel%5D%5Boption%5D%5Bpr_categoryhierarchy%5D%5B0%5D=2-Bellezza%2FAccessori%20di%20Bellezza%2FAccessori';
     $this->request->setEndPointHostname('http://google.de/');
     $this->request->setNamespace('tx_aoesolr_pi1');
     $this->request->setFacetOptionValue('pr_categoryhierarchy', '2-Bellezza/Accessori di Bellezza/Accessori');
     $this->assertEquals($testUrl, $this->request->getUrl());
 }
 /**
  * @param \Searchperience\RemoteAccess\Domain\Request $request
  * @return \Searchperience\RemoteAccess\Domain\Response
  */
 public function fetch(\Searchperience\RemoteAccess\Domain\Request $request)
 {
     $response = new \Searchperience\RemoteAccess\Domain\Response();
     $url = $request->getUrl();
     /** @var  $httpRequest \Guzzle\Http\Message\Request */
     $httpRequest = $this->httpClient->get($url);
     try {
         /** @var  $httpResponse \Guzzle\Http\Message\Response */
         $httpResponse = $httpRequest->send();
         $rawResponse = $httpResponse->getBody(true);
         $response->setRawResponse($rawResponse);
         $statusCode = $httpResponse->getStatusCode();
         $response->setHttpStatus($statusCode);
         if ($statusCode !== 200) {
             $response->setHasError(true);
         }
     } catch (\Exception $e) {
         $response->setHasError(true);
     }
     return $response;
 }