Commit fc8c9c11 authored by catch's avatar catch
Browse files

task: #3625015 Convert final test .modules

By: nicxvan
By: berdir
(cherry picked from commit 37ee1353)
parent dafb9ad5
Loading
Loading
Loading
Loading
Loading
+3 −3
Changes for core/.phpstan-baseline.php: 3 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -22078,10 +22078,10 @@
	'path' => __DIR__ . '/modules/system/tests/modules/default_format_test/src/DefaultFormatTestController.php',
];
$ignoreErrors[] = [
	'message' => '#^Call to deprecated function deprecation_test_function\\(\\)\\:
	'message' => '#^Call to deprecated method testDeprecation\\(\\) of class Drupal\\\\deprecation_test\\\\DeprecatedController\\:
in drupal\\:8\\.4\\.0 and is removed from drupal\\:9\\.0\\.0\\. This is
  the deprecation message for deprecated_test_function\\(\\)\\.$#',
	'identifier' => 'function.deprecated',
  the deprecation message for testDeprecation\\(\\)\\.$#',
	'identifier' => 'staticMethod.deprecated',
	'count' => 1,
	'path' => __DIR__ . '/modules/system/tests/modules/deprecation_test/src/DeprecatedController.php',
];
+0 −18
Changes for core/modules/package_manager/tests/fixtures/build_test_projects/updated_module/1.0.0/updated_module.module: 0 added lines, 18 removed lines.
Original line number Diff line number Diff line
<?php

/**
 * @file
 * Contains global functions for testing updates to a .module file.
 */

/**
 * Page controller that says hello.
 *
 * @return string[]
 *   A renderable array of the page content.
 */
function updated_module_hello(): array {
  return [
    '#markup' => 'Hello!',
  ];
}
+0 −18
Changes for core/modules/package_manager/tests/fixtures/build_test_projects/updated_module/1.1.0/updated_module.module: 0 added lines, 18 removed lines.
Original line number Diff line number Diff line
<?php

/**
 * @file
 * Contains global functions for testing updates to a .module file.
 */

/**
 * Page controller that says hello.
 *
 * @return string[]
 *   A renderable array of the page content.
 */
function updated_module_hello(): array {
  return [
    '#markup' => 'Hello!',
  ];
}
+0 −5
Changes for core/modules/system/tests/modules/deprecation_hook_attribute_test/deprecation_hook_attribute_test.info.yml: 0 added lines, 5 removed lines.
Original line number Diff line number Diff line
name: 'Deprecation test'
type: module
description: 'Support module for testing deprecation behaviors.'
package: Testing
version: VERSION
+0 −39
Changes for core/modules/system/tests/modules/deprecation_test/deprecation_test.module: 0 added lines, 39 removed lines.
Original line number Diff line number Diff line
<?php

/**
 * @file
 * Contains functions for testing calling deprecated functions in tests.
 */

declare(strict_types=1);

/**
 * A deprecated function.
 *
 * @return string
 *   A known return value of 'known_return_value'.
 *
 * @deprecated in drupal:8.4.0 and is removed from drupal:9.0.0. This is
 *   the deprecation message for deprecated_test_function().
 *
 * @see https://www.drupal.org/project/drupal/issues/2870194
 */
function deprecation_test_function() {
  // phpcs:ignore Drupal.Semantics.FunctionTriggerError
  @trigger_error('This is the deprecation message for deprecation_test_function().', E_USER_DEPRECATED);
  return 'known_return_value';
}

/**
 * Implements hook_deprecated_hook().
 */
function deprecation_test_deprecated_hook($arg): mixed {
  return $arg;
}

/**
 * Implements hook_deprecated_alter_alter().
 */
function deprecation_test_deprecated_alter_alter(&$data, $context1, $context2): void {
  $data = [$context1, $context2];
}
Loading