public function CodeFilterPrismUnitTestCase::testPhpFilterWithMarkup in Code Filter 7
Checks that <?php tags are escaped and highlighted correctly with markup.
File
- modules/
codefilter_prism/ codefilter_prism.test, line 87 - Unit tests for codefilter_prism.module.
Class
- CodeFilterPrismUnitTestCase
- Contains unit tests for codefilter_prism.module.
Code
public function testPhpFilterWithMarkup() {
$input = <<<EOD
<?php
return '<p>' . \$result . '</p>';
?>
EOD;
$expected = <<<EOD
<pre class="codeblock"><code class="language-php">return '<p>' . \$result . '</p>';
</code></pre>
EOD;
$result = $this
->filterText($input);
$this
->assertIdentical($expected, $result);
}