You are here

public function ChangeLoginFormPathTest::testChangeLoginFormPath in Redirect 403 to User Login 2.x

Same name and namespace in other branches
  1. 8 tests/src/Functional/ChangeLoginFormPathTest.php \Drupal\Tests\r4032login\Functional\ChangeLoginFormPathTest::testChangeLoginFormPath()

Test user login form path option modification.

@dataProvider changeLoginFormPathDataProvider

Parameters

bool $optionValue: The option value for "user_login_path".

string $path: Request path.

string $destination: Resulting URL.

Throws

\Behat\Mink\Exception\ExpectationException

File

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

Class

ChangeLoginFormPathTest
Test that it is possible to change the path to the user login form.

Namespace

Drupal\Tests\r4032login\Functional

Code

public function testChangeLoginFormPath($optionValue, $path, $destination) {
  $config = $this
    ->config('r4032login.settings');
  $config
    ->set('user_login_path', $optionValue);
  $config
    ->save();
  $this
    ->drupalGet($path);
  $this
    ->assertSession()
    ->addressEquals($destination);
}