We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents a2d9911 + 014223a commit b0a8ad8Copy full SHA for b0a8ad8
2 files changed
src/Bigcommerce/Api/Resources/Category.php
@@ -26,4 +26,9 @@ public function update()
26
{
27
return Client::updateCategory($this->id, $this->getUpdateFields());
28
}
29
+
30
+ public function delete()
31
+ {
32
+ return Client::deleteCategory($this->id);
33
+ }
34
test/Unit/Api/Resources/CategoryTest.php
@@ -25,4 +25,14 @@ public function testUpdatePassesThroughToConnection()
25
$category->update();
+ public function testDeletePassesThroughToConnection()
+ $category = new Category((object)(array('id' => 1)));
+ $this->connection->expects($this->once())
+ ->method('delete')
+ ->with($this->basePath . '/categories/1');
35
36
+ $category->delete();
37
38
0 commit comments