public function BlockInterestCohortTest::testDefaultBlocking in Drupal 10
Same name and namespace in other branches
- 9 core/tests/Drupal/KernelTests/Core/Http/BlockInterestCohortTest.php \Drupal\KernelTests\Core\Http\BlockInterestCohortTest::testDefaultBlocking()
Tests that FLoC is blocked by default.
File
- core/tests/ Drupal/ KernelTests/ Core/ Http/ BlockInterestCohortTest.php, line 22 
Class
- BlockInterestCohortTest
- Tests the Permissions-Policy header added by FinishResponseSubscriber.
Namespace
Drupal\KernelTests\Core\HttpCode
public function testDefaultBlocking() {
  $request = Request::create('/');
  $response = \Drupal::service('http_kernel')
    ->handle($request);
  $this
    ->assertSame('interest-cohort=()', $response->headers
    ->get('Permissions-Policy'));
}