class UserPathTest

Same name and namespace in other branches
  1. 11.x core/modules/views/tests/src/Functional/UserPathTest.php \Drupal\Tests\views\Functional\UserPathTest
  2. 10 core/modules/views/tests/src/Functional/UserPathTest.php \Drupal\Tests\views\Functional\UserPathTest
  3. 8.9.x core/modules/views/tests/src/Functional/UserPathTest.php \Drupal\Tests\views\Functional\UserPathTest

Tests overriding user paths using wildcards.

@group views

Hierarchy

Expanded class hierarchy of UserPathTest

File

core/modules/views/tests/src/Functional/UserPathTest.php, line 10

Namespace

Drupal\Tests\views\Functional
View source
class UserPathTest extends ViewTestBase {
  
  /**
   * {@inheritdoc}
   */
  protected static $modules = [
    'views',
    'user',
  ];
  
  /**
   * {@inheritdoc}
   */
  protected $defaultTheme = 'stark';
  
  /**
   * The test views to use.
   *
   * @var array
   */
  public static $testViews = [
    'test_user_path',
  ];
  
  /**
   * Tests if the login page is still available when using a wildcard path.
   */
  public function testUserLoginPage() {
    $this->drupalGet('user/login');
    $this->assertSession()
      ->statusCodeEquals(200);
  }

}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.