You are here

JanrainCaptureTest.php in Janrain Registration 8

File

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

namespace Drupal\Tests\janrain_capture\Functional;

use Drupal\Tests\BrowserTestBase;

/**
 * Tests janrain_capture module expectations.
 *
 * @group janrain_capture_profile
 * @runTestsInSeparateProcesses
 * @preserveGlobalState disabled
 */
class JanrainCaptureTest extends BrowserTestBase {

  /**
   * {@inheritdoc}
   */
  protected $defaultTheme = 'stark';

  /**
   * Modules installed for all tests.
   *
   * @var array
   */
  public static $modules = [
    'janrain_capture',
  ];

  /**
   * Tests janrain_capture module.
   */
  public function testJanrainCapture() {
    $assert_session = $this
      ->assertSession();

    // Forgot password link should require authorisation code.
    $this
      ->drupalGet('janrain_capture/oauth', [
      'query' => [
        'url_type' => 'forgot',
      ],
    ]);
    $assert_session
      ->statusCodeEquals(200);

    // Make sure the setting forms are working.
    $this
      ->drupalLogin($this->rootUser);
    $this
      ->drupalGet('admin/config/people/janrain-capture/screens-settings');
    $assert_session
      ->statusCodeEquals(200);
  }

}

Classes

Namesort descending Description
JanrainCaptureTest Tests janrain_capture module expectations.