You are here

SocialAuthGoogleSettingsFormTest.php in Social Auth Google 3.x

Same filename and directory in other branches
  1. 8.2 tests/src/Functional/SocialAuthGoogleSettingsFormTest.php

File

tests/src/Functional/SocialAuthGoogleSettingsFormTest.php
View source
<?php

namespace Drupal\Tests\social_auth_google\Functional;

use Drupal\Tests\social_auth\Functional\SocialAuthTestBase;

/**
 * Test Social Auth Google settings form.
 *
 * @group social_auth
 *
 * @ingroup social_auth_google
 */
class SocialAuthGoogleSettingsFormTest extends SocialAuthTestBase {

  /**
   * Modules to enable.
   *
   * @var array
   */
  public static $modules = [
    'social_auth_google',
  ];

  /**
   * {@inheritdoc}
   */
  protected function setUp() {
    $this->module = 'social_auth_google';
    $this->provider = 'google';
    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();
  }

}

Classes

Namesort descending Description
SocialAuthGoogleSettingsFormTest Test Social Auth Google settings form.