function ThemeTest::testPreprocessCallback

Same name in other branches
  1. 10 core/modules/system/tests/src/Functional/Theme/ThemeTest.php \Drupal\Tests\system\Functional\Theme\ThemeTest::testPreprocessCallback()
  2. 11.x 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 201

Class

ThemeTest
Tests low-level theme functions.

Namespace

Drupal\Tests\system\Functional\Theme

Code

public function testPreprocessCallback() {
    $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.