public function testSuccessfulRetrieval()
 {
     $this->wrapper->setValidatorRawOutput($this->getFixture('LocalProxyErrorFreeOutput.txt'));
     $this->setTestFixturePath(__CLASS__, __FUNCTION__);
     $this->setHttpFixtures($this->getHttpFixtures($this->getTestFixturePath() . '/HttpResponses'));
     $this->wrapper->getLocalProxy()->getConfiguration()->setHttpClient($this->getHttpClient());
     $output = $this->wrapper->validate();
     $this->assertEquals(self::URL_TO_LINT, $output->getStatusLine());
 }
 public function setUp()
 {
     $this->wrapper = $this->getNewWrapper();
     $this->wrapper->getConfiguration()->setUrlToLint(self::URL_TO_LINT);
     $this->setHttpFixtures($this->buildHttpFixtureSet(array('CURL/' . $this->getStatusCode() . ' message')));
     $this->wrapper->getLocalProxy()->getConfiguration()->setHttpClient($this->getHttpClient());
     $this->wrapper->enableDeferToParentIfNoRawOutput();
     try {
         $this->wrapper->validate();
         $this->fail('CURL ' . $this->getStatusCode() . ' exception not thrown');
     } catch (ConnectException $connectException) {
         $this->assertEquals('cURL error ' . $this->getStatusCode() . ': message', $connectException->getMessage());
     }
 }
 public function setUp()
 {
     $this->wrapper = $this->getNewWrapper();
     $this->wrapper->getConfiguration()->setUrlToLint(self::URL_TO_LINT);
     $this->setHttpFixtures($this->buildHttpFixtureSet(array('HTTP/1.0 ' . $this->getStatusCode())));
     $this->wrapper->getLocalProxy()->getConfiguration()->setHttpClient($this->getHttpClient());
     $this->wrapper->enableDeferToParentIfNoRawOutput();
     try {
         $this->wrapper->validate();
         $this->fail('HTTP ' . $this->getStatusCode() . ' exception not thrown');
     } catch (\webignition\WebResource\Exception\Exception $webResourceException) {
         $this->assertEquals($this->getStatusCode(), $webResourceException->getResponse()->getStatusCode());
     }
 }