public function setUp()
 {
     $simpleXmlElement = new \SimpleXMLElement(__DIR__ . '/../../../../fixtures/search_results_response.xml', 0, true);
     $factory = new ResponseFactory();
     $this->searchResultsResponse = $factory->createSearchResultsResponse($simpleXmlElement);
 }
Пример #2
0
 /**
  * @param $productId
  * @return \BolOpenApi\Response\ProductResponse
  * @throws \InvalidArgumentException
  */
 public function products($productId)
 {
     if (is_float($productId)) {
         throw new \InvalidArgumentException('Given $productId as float, possible integer overflow. Try passing $productId as string');
     }
     $uri = '/openapi/services/rest/catalog/v3/products/' . $productId;
     $obj = new ResponseFactory();
     return $obj->createProductResponse($this->getXmlElement($this->call($uri)));
 }
 public function setUp()
 {
     $simpleXmlElement = new \SimpleXMLElement(__DIR__ . '/../../../../fixtures/product_response.xml', 0, true);
     $factory = new ResponseFactory();
     $this->productResponse = $factory->createProductResponse($simpleXmlElement);
 }