/**
  * 
  * @return WebResourceService
  */
 public function getWebResourceService()
 {
     if (is_null($this->webResourceService)) {
         $this->webResourceService = new WebResourceService();
         $this->webResourceService->getConfiguration()->setContentTypeWebResourceMap(array('text/javascript' => 'webignition\\WebResource\\WebResource', 'application/javascript' => 'webignition\\WebResource\\WebResource', 'application/x-javascript' => 'webignition\\WebResource\\WebResource'));
         $this->webResourceService->getConfiguration()->disableAllowUnknownResourceTypes();
     }
     return $this->webResourceService;
 }
 public function setUp()
 {
     parent::setUp();
     $this->service = $this->getDefaultWebResourceService();
     $this->service->getConfiguration()->enableRetryWithUrlEncodingDisabled();
 }
예제 #3
0
 protected function getDefaultWebResourceService()
 {
     $service = new WebResourceService();
     $service->getConfiguration()->setHttpClient($this->getHttpClient());
     return $service;
 }