You are here

protected function CasPasswordResetTest::setUp in CAS 2.x

Same name and namespace in other branches
  1. 8 tests/src/Functional/CasPasswordResetTest.php \Drupal\Tests\cas\Functional\CasPasswordResetTest::setUp()

Overrides BrowserTestBase::setUp

File

tests/src/Functional/CasPasswordResetTest.php, line 38

Class

CasPasswordResetTest
Tests the user's ability to reset their password.

Namespace

Drupal\Tests\cas\Functional

Code

protected function setUp() : void {
  parent::setUp();
  $this->settings = $this
    ->config('cas.settings');

  // Create two users, one associated with CAS and one that's not.
  $this->casUser = $this
    ->drupalCreateUser([], 'user_with_cas');
  $this->container
    ->get('cas.user_manager')
    ->setCasUsernameForAccount($this->casUser, 'user_with_cas');
  $this->nonCasUser = $this
    ->drupalCreateUser([], 'user_without_cas');
}