You are here

public function TestRestClient::objectDescribe in Salesforce Suite 5.0.x

Same name and namespace in other branches
  1. 8.4 src/Tests/TestRestClient.php \Drupal\salesforce\Tests\TestRestClient::objectDescribe()
  2. 8.3 src/Tests/TestRestClient.php \Drupal\salesforce\Tests\TestRestClient::objectDescribe()

Hard-code the object descriptions for testing.

Overrides RestClient::objectDescribe

File

src/Tests/TestRestClient.php, line 63

Class

TestRestClient
Test Salesforce REST client.

Namespace

Drupal\salesforce\Tests

Code

public function objectDescribe($name, $reset = FALSE) {
  $contents = file_get_contents(__DIR__ . '/objectDescribe.json');
  return new RestResponseDescribe(new RestResponse(new Response(200, [
    'Content-Type' => 'application/json;charset=UTF-8',
  ], $contents)));
}