예제 #1
0
 private function productGet($id)
 {
     $product = $this->client->getProduct($id);
     $this->assertFalse($this->client->hasErrors());
     $this->assertNotEmpty($product, 'Product response is empty');
     $this->assertEquals('test product 1', $product->title, 'Product title does not match');
     $this->assertEquals('test product <strong>body html</strong>', $product->body_html, 'Product body_html does not match');
 }
 /**
  * @param StoreEntity $store
  * @throws NoShopifyProductFound
  */
 public function checkHandlingFeeProduct(StoreEntity $store)
 {
     $this->setSettings($store);
     try {
         $response = $this->client->getProduct(['id' => $store->getShopifyHandlingFeeProductId()]);
     } catch (CommandClientException $e) {
         if ($e->getResponse()->getStatusCode() == '404') {
             throw new NoShopifyProductFound(sprintf('Handling fee Id: %s cannot be found within shopify', $store->getShopifyHandlingFeeProductId()));
         }
     }
 }