public function setUp()
 {
     $methods = array('useXml', 'failOnError', 'authenticate', 'setTimeout', 'useProxy', 'verifyPeer', 'addHeader', 'getLastError', 'get', 'post', 'head', 'put', 'delete', 'getStatus', 'getStatusMessage', 'getBody', 'getHeader', 'getHeaders', '__destruct');
     $this->connection = $this->getMockBuilder('Bigcommerce\\Api\\Connection')->disableOriginalConstructor()->setMethods($methods)->getMock();
     $this->basePath = $this->getStaticAttribute('Bigcommerce\\Api\\Client', 'api_path');
     Client::setConnection($this->connection);
 }
 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);
 }