File tree Expand file tree Collapse file tree 4 files changed +0
-90
lines changed
src/Bigcommerce/Api/Resources Expand file tree Collapse file tree 4 files changed +0
-90
lines changed Original file line number Diff line number Diff line change @@ -19,17 +19,6 @@ class Sku extends Resource
1919 'product_id ' ,
2020 );
2121
22- public function options ()
23- {
24- $ options = Client::getCollection ($ this ->fields ->options ->resource , 'SkuOption ' );
25-
26- foreach ($ options as $ option ) {
27- $ option ->product_id = $ this ->product_id ;
28- }
29-
30- return $ options ;
31- }
32-
3322 public function create ()
3423 {
3524 return Client::createResource ('/products/ ' . $ this ->product_id . '/skus ' , $ this ->getCreateFields ());
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -25,24 +25,4 @@ public function testUpdatePassesThroughToConnection()
2525
2626 $ sku ->update ();
2727 }
28-
29- public function testOptionsPassesThroughToConnection ()
30- {
31- $ sku = new Sku ((object )array (
32- 'product_id ' => 1 ,
33- 'options ' => (object )array (
34- 'resource ' => '/products/1/skus/1/options '
35- )
36- ));
37- $ this ->connection ->expects ($ this ->once ())
38- ->method ('get ' )
39- ->with ($ this ->basePath . '/products/1/skus/1/options ' )
40- ->will ($ this ->returnValue (array (array (), array ())));
41-
42- $ collection = $ sku ->options ;
43- $ this ->assertInternalType ('array ' , $ collection );
44- foreach ($ collection as $ condition ) {
45- $ this ->assertInstanceOf ('Bigcommerce \\Api \\Resources \\SkuOption ' , $ condition );
46- }
47- }
4828}
You can’t perform that action at this time.
0 commit comments