Loading core/tests/Drupal/Tests/RequirementsPageTrait.php +5 −5 Original line number Diff line number Diff line Loading @@ -14,7 +14,7 @@ trait RequirementsPageTrait { /** * Handles the update requirements page. */ protected function updateRequirementsProblem() { protected function updateRequirementsProblem(): void { // Assert a warning is shown on older test environments. $links = $this->getSession()->getPage()->findAll('named', ['link', 'try again']); Loading @@ -37,7 +37,7 @@ protected function updateRequirementsProblem() { * next screen of the installer. If an expected warning is not found, or if * a warning not in the list is present, a fail is raised. */ protected function continueOnExpectedWarnings($expected_warnings = []) { protected function continueOnExpectedWarnings($expected_warnings = []): void { $this->assertSession()->pageTextNotContains('Errors found'); $this->assertWarningSummaries($expected_warnings); $this->clickLink('continue anyway'); Loading @@ -54,7 +54,7 @@ protected function continueOnExpectedWarnings($expected_warnings = []) { * A list of warning summaries to expect on the requirements screen (e.g. * 'PHP', 'PHP OPcode caching', etc.). */ protected function assertWarningSummaries(array $summaries) { protected function assertWarningSummaries(array $summaries): void { $this->assertRequirementSummaries($summaries, 'warning'); } Loading @@ -68,7 +68,7 @@ protected function assertWarningSummaries(array $summaries) { * A list of error summaries to expect on the requirements screen (e.g. * 'PHP', 'PHP OPcode caching', etc.). */ protected function assertErrorSummaries(array $summaries) { protected function assertErrorSummaries(array $summaries): void { $this->assertRequirementSummaries($summaries, 'error'); } Loading @@ -84,7 +84,7 @@ protected function assertErrorSummaries(array $summaries) { * @param string $type * The type of requirement, either 'warning' or 'error'. */ protected function assertRequirementSummaries(array $summaries, string $type) { protected function assertRequirementSummaries(array $summaries, string $type): void { // The selectors are different for Claro. $is_claro = stripos($this->getSession()->getPage()->getContent(), 'claro/css/theme/maintenance-page.css') !== FALSE; Loading core/tests/Drupal/Tests/SchemaCheckTestTrait.php +2 −2 Original line number Diff line number Diff line Loading @@ -24,7 +24,7 @@ trait SchemaCheckTestTrait { * @param array $config_data * The configuration data. */ public function assertConfigSchema(TypedConfigManagerInterface $typed_config, $config_name, $config_data) { public function assertConfigSchema(TypedConfigManagerInterface $typed_config, $config_name, $config_data): void { $check = $this->checkConfigSchema($typed_config, $config_name, $config_data); $message = ''; if ($check === FALSE) { Loading @@ -46,7 +46,7 @@ public function assertConfigSchema(TypedConfigManagerInterface $typed_config, $c * @param string $config_name * The configuration name. */ public function assertConfigSchemaByName($config_name) { public function assertConfigSchemaByName($config_name): void { $config = $this->config($config_name); $this->assertConfigSchema(\Drupal::service('config.typed'), $config->getName(), $config->get()); } Loading core/tests/Drupal/Tests/UpdatePathTestTrait.php +3 −3 Original line number Diff line number Diff line Loading @@ -29,7 +29,7 @@ trait UpdatePathTestTrait { * @param string|null $update_url * The update URL. */ protected function runUpdates($update_url = NULL) { protected function runUpdates($update_url = NULL): void { if (!$update_url) { $update_url = Url::fromRoute('system.db_update'); } Loading Loading @@ -163,7 +163,7 @@ protected function runUpdates($update_url = NULL) { /** * Tests the selection page. */ protected function doSelectionTest() { protected function doSelectionTest(): void { // No-op. Tests wishing to do test the selection page or the general // update.php environment before running update.php can override this method // and implement their required tests. Loading @@ -172,7 +172,7 @@ protected function doSelectionTest() { /** * Installs the update_script_test module and makes an update available. */ protected function ensureUpdatesToRun() { protected function ensureUpdatesToRun(): void { \Drupal::service('module_installer')->install(['update_script_test']); // Reset the schema so there is an update to run. \Drupal::service('update.update_hook_registry')->setInstalledVersion('update_script_test', 8000); Loading Loading
core/tests/Drupal/Tests/RequirementsPageTrait.php +5 −5 Original line number Diff line number Diff line Loading @@ -14,7 +14,7 @@ trait RequirementsPageTrait { /** * Handles the update requirements page. */ protected function updateRequirementsProblem() { protected function updateRequirementsProblem(): void { // Assert a warning is shown on older test environments. $links = $this->getSession()->getPage()->findAll('named', ['link', 'try again']); Loading @@ -37,7 +37,7 @@ protected function updateRequirementsProblem() { * next screen of the installer. If an expected warning is not found, or if * a warning not in the list is present, a fail is raised. */ protected function continueOnExpectedWarnings($expected_warnings = []) { protected function continueOnExpectedWarnings($expected_warnings = []): void { $this->assertSession()->pageTextNotContains('Errors found'); $this->assertWarningSummaries($expected_warnings); $this->clickLink('continue anyway'); Loading @@ -54,7 +54,7 @@ protected function continueOnExpectedWarnings($expected_warnings = []) { * A list of warning summaries to expect on the requirements screen (e.g. * 'PHP', 'PHP OPcode caching', etc.). */ protected function assertWarningSummaries(array $summaries) { protected function assertWarningSummaries(array $summaries): void { $this->assertRequirementSummaries($summaries, 'warning'); } Loading @@ -68,7 +68,7 @@ protected function assertWarningSummaries(array $summaries) { * A list of error summaries to expect on the requirements screen (e.g. * 'PHP', 'PHP OPcode caching', etc.). */ protected function assertErrorSummaries(array $summaries) { protected function assertErrorSummaries(array $summaries): void { $this->assertRequirementSummaries($summaries, 'error'); } Loading @@ -84,7 +84,7 @@ protected function assertErrorSummaries(array $summaries) { * @param string $type * The type of requirement, either 'warning' or 'error'. */ protected function assertRequirementSummaries(array $summaries, string $type) { protected function assertRequirementSummaries(array $summaries, string $type): void { // The selectors are different for Claro. $is_claro = stripos($this->getSession()->getPage()->getContent(), 'claro/css/theme/maintenance-page.css') !== FALSE; Loading
core/tests/Drupal/Tests/SchemaCheckTestTrait.php +2 −2 Original line number Diff line number Diff line Loading @@ -24,7 +24,7 @@ trait SchemaCheckTestTrait { * @param array $config_data * The configuration data. */ public function assertConfigSchema(TypedConfigManagerInterface $typed_config, $config_name, $config_data) { public function assertConfigSchema(TypedConfigManagerInterface $typed_config, $config_name, $config_data): void { $check = $this->checkConfigSchema($typed_config, $config_name, $config_data); $message = ''; if ($check === FALSE) { Loading @@ -46,7 +46,7 @@ public function assertConfigSchema(TypedConfigManagerInterface $typed_config, $c * @param string $config_name * The configuration name. */ public function assertConfigSchemaByName($config_name) { public function assertConfigSchemaByName($config_name): void { $config = $this->config($config_name); $this->assertConfigSchema(\Drupal::service('config.typed'), $config->getName(), $config->get()); } Loading
core/tests/Drupal/Tests/UpdatePathTestTrait.php +3 −3 Original line number Diff line number Diff line Loading @@ -29,7 +29,7 @@ trait UpdatePathTestTrait { * @param string|null $update_url * The update URL. */ protected function runUpdates($update_url = NULL) { protected function runUpdates($update_url = NULL): void { if (!$update_url) { $update_url = Url::fromRoute('system.db_update'); } Loading Loading @@ -163,7 +163,7 @@ protected function runUpdates($update_url = NULL) { /** * Tests the selection page. */ protected function doSelectionTest() { protected function doSelectionTest(): void { // No-op. Tests wishing to do test the selection page or the general // update.php environment before running update.php can override this method // and implement their required tests. Loading @@ -172,7 +172,7 @@ protected function doSelectionTest() { /** * Installs the update_script_test module and makes an update available. */ protected function ensureUpdatesToRun() { protected function ensureUpdatesToRun(): void { \Drupal::service('module_installer')->install(['update_script_test']); // Reset the schema so there is an update to run. \Drupal::service('update.update_hook_registry')->setInstalledVersion('update_script_test', 8000); Loading