示例#1
0
 function testRenderableOuterTags()
 {
     $t = new Tag();
     $actual = $t->html([$t->head(), $t->body(a::c1ass('container'), [$t->header(['style' => 'width: 1px solid #000;'], a::id('my-header'), $t->h1('header'))], new Panel('Test', 'inside content'))]);
     $expected = '<html><head></head><body class="container"><header style="width: 1px solid #000;"' . ' id="my-header"><h1>header</h1></header><div class="panel panel-default"><div class="panel-heading">' . '<h3 class="panel-title">Test</h3></div><div class="panel-body">inside content</div></div></body></html>';
     $this->assertEquals($expected, $actual);
 }
示例#2
0
 public function template()
 {
     $t = new Tag();
     echo "\n";
     /** @noinspection PhpMethodParametersCountMismatchInspection */
     $t->span(a::ariaChecked('false'));
     echo $t->div(a::id('main'), [$t->h1(['class' => 'test'], 'text'), $t->h2('{{title}}'), $t->div(a::id('body'), a::c1ass('body', 'container'), '{{body}}')], new Panel('Test', 'This is a test panel'));
     echo "\n\n";
 }