Skip to content
Snippets Groups Projects
Commit 00341321 authored by Angie Byron's avatar Angie Byron
Browse files

Issue #2049207 by dlu, blakehall, janstoeckler, ramlev, Moderate | Cottser:...

Issue #2049207 by dlu, blakehall, janstoeckler, ramlev, Moderate | Cottser: Replace .tpl.php with .html.twig in documentation.
parent 7f45af48
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
<?php
/**
* @file
* Contains \Drupal\system\Tests\Theme\HtmlAttributesTest.
*/
namespace Drupal\system\Tests\Theme;
use Drupal\simpletest\WebTestBase;
/**
* Functional tests for 'html' and 'body' element attributes.
*/
class HtmlAttributesTest extends WebTestBase {
/**
* Modules to enable.
*
* @var array
*/
public static $modules = array('theme_test');
public static function getInfo() {
return array(
'name' => "'html' and 'body' element attributes",
'description' => "Test attributes inserted in the 'html' and 'body' elements on the page.",
'group' => 'Theme',
);
}
/**
* Tests that attributes in the 'html' and 'body' elements can be altered.
*/
function testThemeHtmlAttributes() {
$this->drupalGet('');
$attributes = $this->xpath('/html[@theme_test_html_attribute="theme test html attribute value"]');
$this->assertTrue(count($attributes) == 1, "Attribute set in the 'html' element via hook_preprocess_HOOK() found.");
$attributes = $this->xpath('/html/body[@theme_test_body_attribute="theme test body attribute value"]');
$this->assertTrue(count($attributes) == 1, "Attribute set in the 'body' element via hook_preprocess_HOOK() found.");
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment