*
* @var array
*/
- public static $modules = ['system', 'common_test'];
+ public static $modules = ['system', 'common_test', 'theme_test'];
/**
* Tests theme preprocess functions being able to attach assets.
\Drupal::state()->set('theme_preprocess_attached_test', FALSE);
}
+ /**
+ * Ensures that render array children are processed correctly.
+ */
+ public function testRenderChildren() {
+ // Ensure that #prefix and #suffix is only being printed once since that is
+ // the behaviour the caller code expects.
+ $build = [
+ '#type' => 'container',
+ '#theme' => 'theme_test_render_element_children',
+ '#prefix' => 'kangaroo',
+ '#suffix' => 'kitten',
+ ];
+ $this->render($build);
+ $this->removeWhiteSpace();
+ $this->assertNoRaw('<div>kangarookitten</div>');
+ }
+
/**
* Tests that we get an exception when we try to attach an illegal type.
*/