function AuthenticationManagerTest::providerTestDefaultFilter

Provides data to self::testDefaultFilter().

File

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

Class

AuthenticationManagerTest
Tests Drupal\Core\Authentication\AuthenticationManager.

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.