function test_error_with_css()
 {
     $text = " div { font-weight: bold; } ";
     $template = new LiquidTemplate();
     $template->parse($text);
     $nodelist = $template->getRoot()->getNodelist();
     $this->assertEqual($text, $template->render());
     $this->assertIsA($nodelist[0], 'string');
 }
Beispiel #2
0
 function test_with_block()
 {
     $template = new LiquidTemplate();
     $template->parse('  {% comment %}  {% endcomment %} ');
     $nodelist = $template->getRoot()->getNodelist();
     $this->assertEqual(3, count($nodelist));
     $this->assertIsA($nodelist[0], 'string');
     $this->assertIsA($nodelist[1], 'LiquidTagComment');
     $this->assertIsA($nodelist[2], 'string');
 }