Loading core/modules/language/tests/src/Functional/LanguageBrowserDetectionAcceptLanguageTest.php +1 −1 Original line number Diff line number Diff line Loading @@ -102,7 +102,7 @@ public function testAcceptLanguageEmptyDefault(): void { $this->assertSession()->responseHeaderDoesNotExist('X-Drupal-Cache'); // Check with browser without language settings - should return fallback language. $this->drupalGet('/system-test/echo/language test', [], ['Accept-Language' => NULL]); $this->drupalGet('/system-test/echo/language test', [], ['Accept-Language' => '']); $this->assertSession()->responseHeaderEquals('Content-Language', 'en'); $this->assertSession()->responseHeaderDoesNotExist('X-Drupal-Cache'); Loading core/modules/menu_ui/tests/src/Functional/MenuUiTest.php +2 −2 Original line number Diff line number Diff line Loading @@ -1059,13 +1059,13 @@ public function enableMenuLink(MenuLinkContent $item) { public function testMenuParentsJsAccess(): void { $this->drupalLogin($this->drupalCreateUser(['administer menu'])); // Just check access to the callback overall, the POST data is irrelevant. $this->drupalGet('admin/structure/menu/parents', ['query' => [MainContentViewSubscriber::WRAPPER_FORMAT => 'drupal_ajax']], ['X-Requested-With: XMLHttpRequest']); $this->drupalGet('admin/structure/menu/parents', ['query' => [MainContentViewSubscriber::WRAPPER_FORMAT => 'drupal_ajax']], ['X-Requested-With' => 'XMLHttpRequest']); $this->assertSession()->statusCodeEquals(200); // Log in as authenticated user. $this->drupalLogin($this->drupalCreateUser()); // Check that a simple user is not able to access the menu. $this->drupalGet('admin/structure/menu/parents', ['query' => [MainContentViewSubscriber::WRAPPER_FORMAT => 'drupal_ajax']], ['X-Requested-With: XMLHttpRequest']); $this->drupalGet('admin/structure/menu/parents', ['query' => [MainContentViewSubscriber::WRAPPER_FORMAT => 'drupal_ajax']], ['X-Requested-With' => 'XMLHttpRequest']); $this->assertSession()->statusCodeEquals(403); } Loading core/modules/page_cache/tests/src/Functional/PageCacheTest.php +1 −1 Original line number Diff line number Diff line Loading @@ -194,7 +194,7 @@ public function testConditionalRequests(): void { $this->assertSession()->statusCodeEquals(304); // Ensure a conditional request without If-None-Match returns 200 OK. $this->drupalGet('', [], ['If-Modified-Since' => $last_modified, 'If-None-Match' => NULL]); $this->drupalGet('', [], ['If-Modified-Since' => $last_modified, 'If-None-Match' => '']); // Verify the page is not printed twice when the cache is warm. $this->assertSession()->responseNotMatches('#<html.*<html#'); $this->assertSession()->statusCodeEquals(200); Loading core/modules/rest/tests/src/Functional/Views/StyleSerializerEntityTest.php +1 −1 Original line number Diff line number Diff line Loading @@ -338,7 +338,7 @@ public function testResponseFormatConfiguration(): void { $this->submitForm([], 'Save'); // Should return a 406. Emulates a sample Firefox header. $this->drupalGet('test/serialize/field', [], ['Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8']); $this->drupalGet('test/serialize/field', [], ['Accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8']); $this->assertSession()->responseHeaderEquals('content-type', 'text/html; charset=UTF-8'); $this->assertSession()->statusCodeEquals(406); Loading core/modules/system/tests/src/Functional/Ajax/FrameworkTest.php +1 −1 Original line number Diff line number Diff line Loading @@ -149,7 +149,7 @@ protected function assertCommand(array $haystack, array $needle): void { * Decoded JSON. */ protected function drupalGetAjax($path, array $options = [], array $headers = []) { $headers[] = 'X-Requested-With: XMLHttpRequest'; $headers = ['X-Requested-With' => 'XMLHttpRequest']; if (!isset($options['query'][MainContentViewSubscriber::WRAPPER_FORMAT])) { $options['query'][MainContentViewSubscriber::WRAPPER_FORMAT] = 'drupal_ajax'; } Loading Loading
core/modules/language/tests/src/Functional/LanguageBrowserDetectionAcceptLanguageTest.php +1 −1 Original line number Diff line number Diff line Loading @@ -102,7 +102,7 @@ public function testAcceptLanguageEmptyDefault(): void { $this->assertSession()->responseHeaderDoesNotExist('X-Drupal-Cache'); // Check with browser without language settings - should return fallback language. $this->drupalGet('/system-test/echo/language test', [], ['Accept-Language' => NULL]); $this->drupalGet('/system-test/echo/language test', [], ['Accept-Language' => '']); $this->assertSession()->responseHeaderEquals('Content-Language', 'en'); $this->assertSession()->responseHeaderDoesNotExist('X-Drupal-Cache'); Loading
core/modules/menu_ui/tests/src/Functional/MenuUiTest.php +2 −2 Original line number Diff line number Diff line Loading @@ -1059,13 +1059,13 @@ public function enableMenuLink(MenuLinkContent $item) { public function testMenuParentsJsAccess(): void { $this->drupalLogin($this->drupalCreateUser(['administer menu'])); // Just check access to the callback overall, the POST data is irrelevant. $this->drupalGet('admin/structure/menu/parents', ['query' => [MainContentViewSubscriber::WRAPPER_FORMAT => 'drupal_ajax']], ['X-Requested-With: XMLHttpRequest']); $this->drupalGet('admin/structure/menu/parents', ['query' => [MainContentViewSubscriber::WRAPPER_FORMAT => 'drupal_ajax']], ['X-Requested-With' => 'XMLHttpRequest']); $this->assertSession()->statusCodeEquals(200); // Log in as authenticated user. $this->drupalLogin($this->drupalCreateUser()); // Check that a simple user is not able to access the menu. $this->drupalGet('admin/structure/menu/parents', ['query' => [MainContentViewSubscriber::WRAPPER_FORMAT => 'drupal_ajax']], ['X-Requested-With: XMLHttpRequest']); $this->drupalGet('admin/structure/menu/parents', ['query' => [MainContentViewSubscriber::WRAPPER_FORMAT => 'drupal_ajax']], ['X-Requested-With' => 'XMLHttpRequest']); $this->assertSession()->statusCodeEquals(403); } Loading
core/modules/page_cache/tests/src/Functional/PageCacheTest.php +1 −1 Original line number Diff line number Diff line Loading @@ -194,7 +194,7 @@ public function testConditionalRequests(): void { $this->assertSession()->statusCodeEquals(304); // Ensure a conditional request without If-None-Match returns 200 OK. $this->drupalGet('', [], ['If-Modified-Since' => $last_modified, 'If-None-Match' => NULL]); $this->drupalGet('', [], ['If-Modified-Since' => $last_modified, 'If-None-Match' => '']); // Verify the page is not printed twice when the cache is warm. $this->assertSession()->responseNotMatches('#<html.*<html#'); $this->assertSession()->statusCodeEquals(200); Loading
core/modules/rest/tests/src/Functional/Views/StyleSerializerEntityTest.php +1 −1 Original line number Diff line number Diff line Loading @@ -338,7 +338,7 @@ public function testResponseFormatConfiguration(): void { $this->submitForm([], 'Save'); // Should return a 406. Emulates a sample Firefox header. $this->drupalGet('test/serialize/field', [], ['Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8']); $this->drupalGet('test/serialize/field', [], ['Accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8']); $this->assertSession()->responseHeaderEquals('content-type', 'text/html; charset=UTF-8'); $this->assertSession()->statusCodeEquals(406); Loading
core/modules/system/tests/src/Functional/Ajax/FrameworkTest.php +1 −1 Original line number Diff line number Diff line Loading @@ -149,7 +149,7 @@ protected function assertCommand(array $haystack, array $needle): void { * Decoded JSON. */ protected function drupalGetAjax($path, array $options = [], array $headers = []) { $headers[] = 'X-Requested-With: XMLHttpRequest'; $headers = ['X-Requested-With' => 'XMLHttpRequest']; if (!isset($options['query'][MainContentViewSubscriber::WRAPPER_FORMAT])) { $options['query'][MainContentViewSubscriber::WRAPPER_FORMAT] = 'drupal_ajax'; } Loading