function GeshiFilterTest::testTitleAttributeOnCodeBlock in GeSHi Filter for syntax highlighting 6        
                          
                  
                        Same name and namespace in other branches
- 7 geshifilter.test \GeshiFilterTest::testTitleAttributeOnCodeBlock()
 
 
File
 
   - ./geshifilter.test, line 503
 
  - Tests for the GeSHi filter module.
 
  Class
  
  - GeshiFilterTest 
 
  
Code
function testTitleAttributeOnCodeBlock() {
  $source_code = "for (int i=0; i!=10; ++i) {\n  fun(i);\n  bar.foo(x, y);\n}";
  
  $this
    ->assertGeshiFilterHighlighting('<code language="cpp">' . $source_code . '</code>', array(
    array(
      'geshifilter-title',
      False,
      0,
      0,
      0,
    ),
  ), t('Setting the title attritbute on code block.'), true);
  
  $this
    ->assertGeshiFilterHighlighting('<code language="cpp" title="Foo the bar!">' . $source_code . '</code>', array(
    array(
      '<div class="geshifilter-title">Foo the bar!</div>',
      False,
      0,
      0,
      0,
    ),
  ), t('Setting the title attritbute on code block.'));
}