public function testDeletePostWithCorrectId() { // Given $username = '******'; $password = '******'; $id = 1; $this->xmlRpcClient->expects($this->once())->method('call')->with('blogger.deletePost', array('', $id, $username, $password, 1))->will($this->returnValue(true)); $client = new Client(null, $username, $password, null, $this->xmlRpcClient); // When $result = $client->deletePost($id); // Then $this->assertTrue($result); }