$this->assertText('Custom theme: seven. Actual theme: seven. Theme callback inheritance is being tested.','Theme callback inheritance correctly uses the administrative theme.');
$this->assertRaw('seven/style.css',"The administrative theme's CSS appears on the page.");
}
/**
* Test the theme negotiation when the site is in maintenance mode.
* Test the theme callback when the site is in maintenance mode.
$this->assertText('Active theme: seven. Actual theme: seven.','The theme negotiation system is correctly triggered for an administrator when the site is in maintenance mode.');
$this->assertText('Custom theme: seven. Actual theme: seven.','The theme callback system is correctly triggered for an administrator when the site is in maintenance mode.');
$this->assertRaw('seven/style.css',"The administrative theme's CSS appears on the page.");
$this->assertText('Active theme: bartik. Actual theme: bartik.','The theme negotiation system falls back on the default theme when a theme that is not enabled is requested.');
$this->assertText('Custom theme: NONE. Actual theme: bartik.','The theme callback system falls back on the default theme when a theme that is not enabled is requested.');
$this->assertRaw('bartik/css/style.css',"The default theme's CSS appears on the page.");
$this->assertText('Active theme: bartik. Actual theme: bartik.','The theme negotiation system falls back on the default theme when a theme that does not exist is requested.');
$this->assertText('Custom theme: NONE. Actual theme: bartik.','The theme callback system falls back on the default theme when a theme that does not exist is requested.');
$this->assertRaw('bartik/css/style.css',"The default theme's CSS appears on the page.");
}
/**
* Test the theme negotiation when no theme is requested.
* Test the theme callback when no theme is requested.
$this->assertText('Active theme: bartik. Actual theme: bartik.','The theme negotiation system falls back on the default theme when no theme is requested.');
$this->assertText('Custom theme: NONE. Actual theme: bartik.','The theme callback system falls back on the default theme when no theme is requested.');
$this->assertRaw('bartik/css/style.css',"The default theme's CSS appears on the page.");
}
/**
* Test that hook_custom_theme() can control the theme of a page.
*/
protectedfunctiondoTestHookCustomTheme(){
// Trigger hook_custom_theme() to dynamically request the Stark theme for
$this->assertText('Custom theme: seven. Actual theme: seven.','The result of hook_custom_theme() does not override what was set in a theme callback.');
$this->assertRaw('seven/style.css',"The Seven theme's CSS appears on the page.");
@@ -118,17 +118,6 @@ function testPreprocessForSuggestions() {
}
}
/**
* Tests the priority of some theme negotiators.
*/
publicfunctiontestNegotiatorPriorities(){
$this->drupalGet('theme-test/priority');
// Ensure that the custom theme negotiator was not able to set the theme.
$this->assertNoText('Theme hook implementor=test_theme_theme_test__suggestion(). Foo=template_preprocess_theme_test','Theme hook suggestion ran with data available from a preprocess function for the base hook.');
}
/**
* Ensure page-front template suggestion is added when on front page.
*/
...
...
@@ -279,4 +268,5 @@ function testPreprocessHtml() {
$this->assertText('theme test page bottom markup','Modules are able to set the page bottom region.');