Test attribute merging.
Render arrays that use a render element and templates (and hence call template_preprocess()) must ensure the attributes at different occassions are all merged correctly:
function testAttributeMerging() {
$output = theme('theme_test_render_element', array(
'elements' => array(
'#attributes' => array(
'data-foo' => 'bar',
),
),
'attributes' => array(
'id' => 'bazinga',
),
));
$this
->assertIdentical($output, '<div id="bazinga" data-foo="bar" data-variables-are-preprocessed></div>' . "\n");
}