protected function WebhookPostTest::createTestKey in Zoom API 8
Same name and namespace in other branches
- 2.0.x tests/src/Functional/WebhookPostTest.php \Drupal\Tests\zoomapi\Functional\WebhookPostTest::createTestKey()
Make a key for testing operations that require a key.
1 call to WebhookPostTest::createTestKey()
- WebhookPostTest::testWebhookPost in tests/
src/ Functional/ WebhookPostTest.php - Test Webhook Post with header.
File
- tests/
src/ Functional/ WebhookPostTest.php, line 127
Class
- WebhookPostTest
- Webhook post tests.
Namespace
Drupal\Tests\zoomapi\FunctionalCode
protected function createTestKey($id, $type = NULL, $provider = NULL) {
$keyArgs = [
'id' => $id,
'label' => 'Zoom API Webhook Test Key',
];
if ($type != NULL) {
$keyArgs['key_type'] = $type;
}
if ($provider != NULL) {
$keyArgs['key_provider'] = $provider;
}
$this->testKey = Key::create($keyArgs);
$this->testKey
->setKeyValue('taco');
$this->testKey
->save();
return $this->testKey;
}