public function BlockInterestCohortTest::testDisableBlockSetting in Drupal 9
Tests that FLoC blocking can be disabled in settings.php.
File
- core/
tests/ Drupal/ KernelTests/ Core/ Http/ BlockInterestCohortTest.php, line 72
Class
- BlockInterestCohortTest
- Tests the Permissions-Policy header added by FinishResponseSubscriber.
Namespace
Drupal\KernelTests\Core\HttpCode
public function testDisableBlockSetting() {
$settings = Settings::getAll();
$settings['block_interest_cohort'] = FALSE;
new Settings($settings);
$request = Request::create('/');
$response = \Drupal::service('http_kernel')
->handle($request);
$this
->assertFalse($response->headers
->has('Permissions-Policy'));
}