public function RestClientTest::setUp in Salesforce Suite 8.3
Same name in this branch
- 8.3 tests/src/Unit/RestClientTest.php \Drupal\Tests\salesforce\Unit\RestClientTest::setUp()
- 8.3 modules/salesforce_encrypt/tests/src/Unit/RestClientTest.php \Drupal\Tests\salesforce_encrypt\Unit\RestClientTest::setUp()
Same name and namespace in other branches
- 8.4 tests/src/Unit/RestClientTest.php \Drupal\Tests\salesforce\Unit\RestClientTest::setUp()
- 5.0.x tests/src/Unit/RestClientTest.php \Drupal\Tests\salesforce\Unit\RestClientTest::setUp()
Set up for each test.
Overrides UnitTestCase::setUp
File
- tests/
src/ Unit/ RestClientTest.php, line 31
Class
- RestClientTest
- @coversDefaultClass \Drupal\salesforce\Rest\RestClient @group salesforce
Namespace
Drupal\Tests\salesforce\UnitCode
public function setUp() {
parent::setUp();
$this->salesforce_id = '1234567890abcde';
$this->methods = [
'getConsumerKey',
'getConsumerSecret',
'getRefreshToken',
'getAccessToken',
'refreshToken',
'getApiEndPoint',
'httpRequest',
];
$this->httpClient = $this
->getMock('\\GuzzleHttp\\Client');
$this->configFactory = $this
->getMockBuilder('\\Drupal\\Core\\Config\\ConfigFactory')
->disableOriginalConstructor()
->getMock();
$this->state = $this
->getMockBuilder('\\Drupal\\Core\\State\\State')
->disableOriginalConstructor()
->getMock();
$this->cache = $this
->getMock('\\Drupal\\Core\\Cache\\CacheBackendInterface');
$this->json = $this
->getMock(Json::CLASS);
$this->time = $this
->getMock(TimeInterface::CLASS);
}