function ThemeTest::testPreprocessCallback

Same name in other branches
  1. 9 core/modules/system/tests/src/Functional/Theme/ThemeTest.php \Drupal\Tests\system\Functional\Theme\ThemeTest::testPreprocessCallback()
  2. 10 core/modules/system/tests/src/Functional/Theme/ThemeTest.php \Drupal\Tests\system\Functional\Theme\ThemeTest::testPreprocessCallback()

Ensures that preprocess callbacks can be defined.

File

core/modules/system/tests/src/Functional/Theme/ThemeTest.php, line 203

Class

ThemeTest
Tests low-level theme functions.

Namespace

Drupal\Tests\system\Functional\Theme

Code

public function testPreprocessCallback() : void {
    $this->drupalGet('theme-test/preprocess-callback');
    $this->assertSession()
        ->pageTextContains('Make Drupal full of kittens again!');
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.