예제 #1
0
 /**
  * @test
  */
 public function it_gets_a_catalog_resource_with_cataloggroups()
 {
     $wps = new Sdk(['auth' => ['*****@*****.**', 'secret']]);
     $catalog = $wps->catalog()->with('groups')->find(1);
     $this->assertInstanceOf('Wps\\Models\\Catalog', $catalog);
     $this->assertInstanceOf('Illuminate\\Support\\Collection', $catalog->groups);
     $this->assertContainsOnlyInstancesOf('Wps\\Models\\CatalogGroup', $catalog->groups);
 }
예제 #2
0
 /**
  * @test
  */
 public function it_gets_imagestyles_of_an_image()
 {
     $wps = new Sdk(['auth' => ['*****@*****.**', 'secret']]);
     $image = $wps->image()->find(1);
     $this->assertContainsOnlyInstancesOf(Wps\Models\Imagestyle::class, $image->imagestyles);
 }
예제 #3
0
 /**
  * @test
  */
 public function it_gets_the_brand_of_a_product()
 {
     $wps = new Sdk(['auth' => ['*****@*****.**', 'secret']]);
     $product = $wps->product()->find(1);
     $this->assertInstanceOf(Wps\Models\Brand::class, $product->brand);
 }