Verified Commit e15e26c9 authored by Dave Long's avatar Dave Long
Browse files

refactor: #3560851 Convert test_theme to OOP

By: nicxvan
By: berdir
By: ghost of drupal past
(cherry picked from commit b75cccea)
parent 9b17226b
Loading
Loading
Loading
Loading
Loading
+0 −6
Original line number Diff line number Diff line
@@ -32651,12 +32651,6 @@
	'count' => 1,
	'path' => __DIR__ . '/modules/system/tests/modules/theme_test/src/ThemeTestController.php',
];
$ignoreErrors[] = [
	'message' => '#^Method Drupal\\\\theme_test\\\\ThemeTestController\\:\\:testThemeClass\\(\\) has no return type specified\\.$#',
	'identifier' => 'missingType.return',
	'count' => 1,
	'path' => __DIR__ . '/modules/system/tests/modules/theme_test/src/ThemeTestController.php',
];
$ignoreErrors[] = [
	'message' => '#^Method Drupal\\\\theme_test\\\\ThemeTestPreprocess\\:\\:preprocess\\(\\) has no return type specified\\.$#',
	'identifier' => 'missingType.return',
+0 −6
Original line number Diff line number Diff line
@@ -85,12 +85,6 @@ public function theme($existing, $type, $theme, $path) : array {
      'base hook' => 'container',
    ];

    $items['theme_test_theme_class'] = [
      'variables' => [
        'message' => '',
      ],
    ];

    $items['theme_test_deprecations_preprocess'] = [
      'variables' => [
        'foo' => '',
+0 −10
Original line number Diff line number Diff line
@@ -143,14 +143,4 @@ public function preprocessCallback() {
    ];
  }

  /**
   * Controller for testing a namespaced class in a theme.
   */
  public function testThemeClass() {
    return [
      '#theme' => 'theme_test_theme_class',
      '#title' => 'Testing loading a class from a .theme file',
    ];
  }

}
+0 −1
Original line number Diff line number Diff line
<p>{{ message }}</p>
+0 −7
Original line number Diff line number Diff line
@@ -87,10 +87,3 @@ theme_test.preprocess_callback:
    _controller: '\Drupal\theme_test\ThemeTestController::preprocessCallback'
  requirements:
    _access: 'TRUE'

theme_test.test_theme_class:
  path: '/theme-test/test-theme-class'
  defaults:
    _controller: '\Drupal\theme_test\ThemeTestController::testThemeClass'
  requirements:
    _access: 'TRUE'
Loading