function AuthenticationManagerTest::testApplyFilterWithFilterprovider
Same name and namespace in other branches
- 9 core/tests/Drupal/Tests/Core/Authentication/AuthenticationManagerTest.php \Drupal\Tests\Core\Authentication\AuthenticationManagerTest::testApplyFilterWithFilterProvider()
- 10 core/tests/Drupal/Tests/Core/Authentication/AuthenticationManagerTest.php \Drupal\Tests\Core\Authentication\AuthenticationManagerTest::testApplyFilterWithFilterProvider()
- 11.x core/tests/Drupal/Tests/Core/Authentication/AuthenticationManagerTest.php \Drupal\Tests\Core\Authentication\AuthenticationManagerTest::testApplyFilterWithFilterProvider()
@covers ::applyFilter
File
-
core/
tests/ Drupal/ Tests/ Core/ Authentication/ AuthenticationManagerTest.php, line 52
Class
- AuthenticationManagerTest
- @coversDefaultClass <a href="/api/drupal/core%21lib%21Drupal%21Core%21Authentication%21AuthenticationManager.php/class/AuthenticationManager/8.9.x" title="Manager for authentication." class="local">\Drupal\Core\Authentication\AuthenticationManager</a> @group Authentication
Namespace
Drupal\Tests\Core\AuthenticationCode
public function testApplyFilterWithFilterprovider() {
$auth_provider = $this->createMock('Drupal\\Tests\\Core\\Authentication\\TestAuthenticationProviderInterface');
$auth_provider->expects($this->once())
->method('appliesToRoutedRequest')
->willReturn(TRUE);
$authentication_collector = new AuthenticationCollector();
$authentication_collector->addProvider($auth_provider, 'filtered', 0);
$authentication_manager = new AuthenticationManager($authentication_collector);
$request = new Request();
$this->assertTrue($authentication_manager->appliesToRoutedRequest($request, FALSE));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.