Loading core/modules/basic_auth/tests/src/Functional/BasicAuthTest.php +1 −2 Original line number Diff line number Diff line Loading @@ -208,10 +208,9 @@ public function testUnauthorizedErrorMessage() { * @see \Drupal\basic_auth\Authentication\Provider\BasicAuth::challengeException() */ public function testCacheabilityOf401Response() { $session = $this->getSession(); $url = Url::fromRoute('router_test.11'); $assert_response_cacheability = function ($expected_page_cache_header_value, $expected_dynamic_page_cache_header_value) use ($session, $url) { $assert_response_cacheability = function ($expected_page_cache_header_value, $expected_dynamic_page_cache_header_value) use ($url) { $this->drupalGet($url); $this->assertSession()->statusCodeEquals(401); $this->assertSession()->responseHeaderEquals('X-Drupal-Cache', $expected_page_cache_header_value); Loading core/modules/config/tests/src/Functional/ConfigImportAllTest.php +1 −1 Original line number Diff line number Diff line Loading @@ -103,7 +103,7 @@ public function testInstallUninstall() { $validation_modules = array_keys($validation_reasons); $this->assertEqualsCanonicalizing($expected_modules, $validation_modules); $modules_to_uninstall = array_filter($all_modules, function ($module) use ($validation_reasons) { $modules_to_uninstall = array_filter($all_modules, function ($module) { // Filter required and not enabled modules. if (!empty($module->info['required']) || $module->status == FALSE) { return FALSE; Loading core/modules/contextual/tests/src/FunctionalJavascript/EditModeTest.php +1 −1 Original line number Diff line number Diff line Loading @@ -120,7 +120,7 @@ protected function assertAnnounceLeaveEditMode(): void { $web_assert = $this->assertSession(); $page = $this->getSession()->getPage(); // Wait till all the contextual links are hidden. $page->waitFor(1, function () use ($page, $web_assert) { $page->waitFor(1, function () use ($page) { return empty($page->find('css', '.contextual .trigger.visually-hidden')); }); $web_assert->elementContains('css', static::ANNOUNCE_SELECTOR, 'Tabbing is no longer constrained by the Contextual module.'); Loading core/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php +1 −1 Original line number Diff line number Diff line Loading @@ -580,7 +580,7 @@ public function testGet() { ? $link_relation_type->getRegisteredName() : $link_relation_type->getExtensionUri(); }, array_keys($this->entity->getEntityType()->getLinkTemplates())); $parse_rel_from_link_header = function ($value) use ($link_relation_type_manager) { $parse_rel_from_link_header = function ($value) { $matches = []; if (preg_match('/rel="([^"]+)"/', $value, $matches) === 1) { return $matches[1]; Loading core/modules/system/tests/src/Kernel/Common/UrlTest.php +1 −1 Original line number Diff line number Diff line Loading @@ -137,7 +137,7 @@ public function testLinkRenderArrayText() { $l = Link::fromTextAndUrl('foo', Url::fromUri('https://www.drupal.org'))->toString(); // Test a renderable array passed to the link generator. $renderer->executeInRenderContext(new RenderContext(), function () use ($renderer, $l) { $renderer->executeInRenderContext(new RenderContext(), function () use ($l) { $renderable_text = ['#markup' => 'foo']; $l_renderable_text = \Drupal::service('link_generator')->generate($renderable_text, Url::fromUri('https://www.drupal.org')); $this->assertEquals($l, $l_renderable_text); Loading Loading
core/modules/basic_auth/tests/src/Functional/BasicAuthTest.php +1 −2 Original line number Diff line number Diff line Loading @@ -208,10 +208,9 @@ public function testUnauthorizedErrorMessage() { * @see \Drupal\basic_auth\Authentication\Provider\BasicAuth::challengeException() */ public function testCacheabilityOf401Response() { $session = $this->getSession(); $url = Url::fromRoute('router_test.11'); $assert_response_cacheability = function ($expected_page_cache_header_value, $expected_dynamic_page_cache_header_value) use ($session, $url) { $assert_response_cacheability = function ($expected_page_cache_header_value, $expected_dynamic_page_cache_header_value) use ($url) { $this->drupalGet($url); $this->assertSession()->statusCodeEquals(401); $this->assertSession()->responseHeaderEquals('X-Drupal-Cache', $expected_page_cache_header_value); Loading
core/modules/config/tests/src/Functional/ConfigImportAllTest.php +1 −1 Original line number Diff line number Diff line Loading @@ -103,7 +103,7 @@ public function testInstallUninstall() { $validation_modules = array_keys($validation_reasons); $this->assertEqualsCanonicalizing($expected_modules, $validation_modules); $modules_to_uninstall = array_filter($all_modules, function ($module) use ($validation_reasons) { $modules_to_uninstall = array_filter($all_modules, function ($module) { // Filter required and not enabled modules. if (!empty($module->info['required']) || $module->status == FALSE) { return FALSE; Loading
core/modules/contextual/tests/src/FunctionalJavascript/EditModeTest.php +1 −1 Original line number Diff line number Diff line Loading @@ -120,7 +120,7 @@ protected function assertAnnounceLeaveEditMode(): void { $web_assert = $this->assertSession(); $page = $this->getSession()->getPage(); // Wait till all the contextual links are hidden. $page->waitFor(1, function () use ($page, $web_assert) { $page->waitFor(1, function () use ($page) { return empty($page->find('css', '.contextual .trigger.visually-hidden')); }); $web_assert->elementContains('css', static::ANNOUNCE_SELECTOR, 'Tabbing is no longer constrained by the Contextual module.'); Loading
core/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php +1 −1 Original line number Diff line number Diff line Loading @@ -580,7 +580,7 @@ public function testGet() { ? $link_relation_type->getRegisteredName() : $link_relation_type->getExtensionUri(); }, array_keys($this->entity->getEntityType()->getLinkTemplates())); $parse_rel_from_link_header = function ($value) use ($link_relation_type_manager) { $parse_rel_from_link_header = function ($value) { $matches = []; if (preg_match('/rel="([^"]+)"/', $value, $matches) === 1) { return $matches[1]; Loading
core/modules/system/tests/src/Kernel/Common/UrlTest.php +1 −1 Original line number Diff line number Diff line Loading @@ -137,7 +137,7 @@ public function testLinkRenderArrayText() { $l = Link::fromTextAndUrl('foo', Url::fromUri('https://www.drupal.org'))->toString(); // Test a renderable array passed to the link generator. $renderer->executeInRenderContext(new RenderContext(), function () use ($renderer, $l) { $renderer->executeInRenderContext(new RenderContext(), function () use ($l) { $renderable_text = ['#markup' => 'foo']; $l_renderable_text = \Drupal::service('link_generator')->generate($renderable_text, Url::fromUri('https://www.drupal.org')); $this->assertEquals($l, $l_renderable_text); Loading