public function testDeleteResourceDeletesToTheRightPlace() { $this->connection->expects($this->once())->method('delete')->with('http://storeurl' . $this->basePath . '/whatever')->will($this->returnValue("Successfully deleted")); Client::configure(array('store_url' => 'http://storeurl', 'username' => 'whatever', 'api_key' => 'whatever')); Client::setConnection($this->connection); // re-set the connection since Client::configure unsets it $result = Client::deleteResource('/whatever'); $this->assertSame("Successfully deleted", $result); }
public function delete() { Client::deleteResource('/products/' . $this->fields->product_id . '/customfields/' . $this->id); }
/** * Delete the given option set. * * @param int $id option id * @return mixed */ public static function deleteOptionSet($id) { Client::deleteResource('/optionsets/' . $id); }