Example #1
0
 /**
  * @test
  */
 public function it_deletes_a_country()
 {
     $wps = new Sdk();
     $wps->addMockResults([new Response(200, [], json_encode($wps->countryResponse(3))), new Response(204, [])]);
     $country = $wps->country()->find(3);
     $success = $country->delete();
     $this->assertEquals(['/countries/3/', '/countries/3/'], $wps->getRequestUris());
     $this->assertEquals(true, $success);
 }
Example #2
0
 /**
  * @test
  */
 public function it_get_the_products_country()
 {
     $wps = new Sdk();
     $wps->addMockResults([new Response(200, [], json_encode($wps->productResponse(1))), new Response(200, [], json_encode($wps->countryResponse(3)))]);
     $product = $wps->product()->find(1);
     $this->assertInstanceOf(Wps\Models\Country::class, $product->country);
     $this->assertEquals(['/products/1/', '/countries/3/'], $wps->getRequestUris());
 }