function GeshiFilterTest::testTitleAttributeOnInlineCode in GeSHi Filter for syntax highlighting 7
Same name and namespace in other branches
- 6 geshifilter.test \GeshiFilterTest::testTitleAttributeOnInlineCode()
File
- ./
geshifilter.test, line 520 - Tests for the GeSHi filter module.
Class
- GeshiFilterTest
- Funcional tests for the GeSHi filter node content.
Code
function testTitleAttributeOnInlineCode() {
$source_code = "for (int i=0; i!=10; ++i) { fun(i); }";
// No title set.
$this
->assertGeshiFilterHighlighting('<code language="cpp">' . $source_code . '</code>', array(
array(
'<span class="geshifilter">',
False,
0,
0,
0,
),
), t('Setting the title attritbute on inline code.'));
// Title set.
$this
->assertGeshiFilterHighlighting('<code language="cpp" title="Foo the bar!">' . $source_code . '</code>', array(
array(
'<span class="geshifilter" title="Foo the bar!">',
False,
0,
0,
0,
),
), t('Setting the title attritbute on inline code.'));
}