function AuthenticationManagerTest::providerTestDefaultFilter

Same name and namespace in other branches
  1. 9 core/tests/Drupal/Tests/Core/Authentication/AuthenticationManagerTest.php \Drupal\Tests\Core\Authentication\AuthenticationManagerTest::providerTestDefaultFilter()
  2. 8.9.x core/tests/Drupal/Tests/Core/Authentication/AuthenticationManagerTest.php \Drupal\Tests\Core\Authentication\AuthenticationManagerTest::providerTestDefaultFilter()
  3. 10 core/tests/Drupal/Tests/Core/Authentication/AuthenticationManagerTest.php \Drupal\Tests\Core\Authentication\AuthenticationManagerTest::providerTestDefaultFilter()

Provides data to
@covers ::applyFilter
" class="local">self::testDefaultFilter
().

File

core/tests/Drupal/Tests/Core/Authentication/AuthenticationManagerTest.php, line 67

Class

AuthenticationManagerTest
@coversDefaultClass \Drupal\Core\Authentication\AuthenticationManager[[api-linebreak]] @group Authentication

Namespace

Drupal\Tests\Core\Authentication

Code

public static function providerTestDefaultFilter() {
  $data = [];
  // No route, cookie is global, should apply.
  $data[] = [
    TRUE,
    FALSE,
    [],
    'cookie',
    TRUE,
  ];
  // No route, cookie is not global, should not apply.
  $data[] = [
    FALSE,
    FALSE,
    [],
    'cookie',
    FALSE,
  ];
  // Route, no _auth, cookie is global, should apply.
  $data[] = [
    TRUE,
    TRUE,
    [],
    'cookie',
    TRUE,
  ];
  // Route, no _auth, cookie is not global, should not apply.
  $data[] = [
    FALSE,
    TRUE,
    [],
    'cookie',
    FALSE,
  ];
  // Route, with _auth and non-matching provider, should not apply.
  $data[] = [
    FALSE,
    TRUE,
    [
      'basic_auth',
    ],
    'cookie',
    TRUE,
  ];
  // Route, with _auth and matching provider should not apply.
  $data[] = [
    TRUE,
    TRUE,
    [
      'basic_auth',
    ],
    'basic_auth',
    TRUE,
  ];
  return $data;
}

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