diff --git a/core/modules/system/src/Tests/Render/Element/TableTest.php b/core/modules/system/src/Tests/Render/Element/TableTest.php index 725f339..6297ca4 100644 --- a/core/modules/system/src/Tests/Render/Element/TableTest.php +++ b/core/modules/system/src/Tests/Render/Element/TableTest.php @@ -10,7 +10,7 @@ use Drupal\simpletest\KernelTestBase; /** - * Tests built-in table theme functions. + * Tests built-in table templates. * * @group Theme */ diff --git a/core/modules/system/src/Tests/Render/TypeTableTest.php b/core/modules/system/src/Tests/Render/TypeTableTest.php new file mode 100644 index 0000000..8a97724 --- /dev/null +++ b/core/modules/system/src/Tests/Render/TypeTableTest.php @@ -0,0 +1,64 @@ + 'Type Table', + 'description' => "Tests #type 'table' render functions.", + 'group' => 'Render', + ); + } + + /** + * Tests that #type table rows can be rendered from the #rows property. + */ + public function testRenderTableFromRows() { + $table = array( + '#type' => 'table', + '#rows' => array( + array('Foo', 'Bar', array('data' => array('#markup' => 'Baz'))), + ), + ); + $this->content = drupal_render($table); + $this->assertRaw('