You are here

protected function CasPasswordResetTest::setUp in CAS 8

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

Overrides BrowserTestBase::setUp

File

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

Class

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

Namespace

Drupal\Tests\cas\Functional

Code

protected function setUp() {
  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');
}