public function OAuthKeyFormTest::testForm in Lightning API 8.4
Same name and namespace in other branches
- 8 tests/src/Kernel/OAuthKeyFormTest.php \Drupal\Tests\lightning_api\Kernel\OAuthKeyFormTest::testForm()
- 8.2 tests/src/Kernel/OAuthKeyFormTest.php \Drupal\Tests\lightning_api\Kernel\OAuthKeyFormTest::testForm()
- 8.3 tests/src/Kernel/OAuthKeyFormTest.php \Drupal\Tests\lightning_api\Kernel\OAuthKeyFormTest::testForm()
File
- tests/
src/ Kernel/ OAuthKeyFormTest.php, line 23
Class
- OAuthKeyFormTest
- @group lightning_api
Namespace
Drupal\Tests\lightning_api\KernelCode
public function testForm() {
$dir = \Drupal::service('file_system')
->realpath('temporary://');
$form_state = (new FormState())
->setValues([
'dir' => $dir,
'private_key' => 'private.key',
'public_key' => 'public.key',
]);
$this->container
->get('form_builder')
->submitForm(OAuthKeyForm::class, $form_state);
$this
->assertKey($dir . '/private.key');
$this
->assertKey($dir . '/public.key');
}