<h2>Inline</h2> <div class="bs-docs-example"> For example, <?php echo TbHtml::code('<section>'); ?> should be wrapped as inline. </div> <pre class="prettyprint linenums"> For example, <?php echo TbHtml::code('<section>'); ?> should be wrapped as inline.</pre> <h2>Code block</h2> <div class="bs-docs-example"> <?php echo TbHtml::codeBlock('<p>Sample text here...</p>'); ?> </div> <pre class="prettyprint linenums"> <?php echo TbHtml::codeBlock('<p>Sample text here...</p>'); ?></pre> </section> <!-- Forms ================================================== --> <section id="forms"> <?php $dropdownConfig = array(array('label' => 'Action', 'url' => '#'), array('label' => 'Another action', 'url' => '#'), array('label' => 'Something else here', 'url' => '#'), TbHtml::menuDivider(), array('label' => 'Separate link', 'url' => '#')); ?>
public function testCodeBlock() { $I = $this->codeGuy; $html = TbHtml::codeBlock('Source code'); $pre = $I->createNode($html, 'pre'); $I->seeNodeText($pre, 'Source code'); }