social_auth_vipps-8.x-2.1/tests/src/Functional/SocialAuthVippsSettingsFormTest.php
tests/src/Functional/SocialAuthVippsSettingsFormTest.php
<?php
namespace Drupal\Tests\social_auth_vipps\Functional;
use Drupal\Tests\social_auth\Functional\SocialAuthTestBase;
/**
* Test Social Auth Vipps settings form.
*
* @group social_auth
*
* @ingroup social_auth_vipps
*/
class SocialAuthVippsSettingsFormTest extends SocialAuthTestBase {
/**
* Modules to enable.
*
* @var array
*/
protected static $modules = ['social_auth_vipps'];
/**
* {@inheritdoc}
*/
protected function setUp() : void {
$this->module = 'social_auth_vipps';
$this->provider = 'vipps';
$this->moduleType = 'social-auth';
parent::setUp();
}
/**
* Test if implementer is shown in the integration list.
*/
public function testIsAvailableInIntegrationList() {
$this->fields = ['client_id', 'client_secret'];
$this->checkIsAvailableInIntegrationList();
}
/**
* Test if permissions are set correctly for settings page.
*
* @throws \Behat\Mink\Exception\ElementNotFoundException
* @throws \Behat\Mink\Exception\ExpectationException
*/
public function testPermissionForSettingsPage() {
$this->checkPermissionForSettingsPage();
}
/**
* Test settings form submission.
*/
public function testSettingsFormSubmission() {
$this->edit = [
'client_id' => $this->randomString(10),
'client_secret' => $this->randomString(10),
];
$this->checkSettingsFormSubmission();
}
}
