</section> <!-- Code ================================================== --> <section id="code"> <div class="page-header"> <h1>Code</h1> </div> <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>
public function testCode() { $I = $this->codeGuy; $html = TbHtml::code('Source code'); $code = $I->createNode($html, 'code'); $I->seeNodeText($code, 'Source code'); }