function ThemeTestCase::testAlter

Ensures theme hook_*_alter() implementations can run before anything is rendered.

File

modules/simpletest/tests/theme.test, line 87

Class

ThemeTestCase
Unit tests for the Theme API.

Code

function testAlter() {
    $this->drupalGet('theme-test/alter');
    $this->assertText('The altered data is test_theme_theme_test_alter_alter was invoked.', 'The theme was able to implement an alter hook during page building before anything was rendered.');
}

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