public function testSubstituteBadTemplate() { $template = ' <html> <head><title>Template test</title></head> <body> <!--###TEMPLATE--> test template <!--###LIST--> <!--###ITEM--> <div><!--###NUM-->1<!--NUM###--> <!--###TEXT-->example text<!--TEXT###--></div> <!--LIST###--> <!--TEMPLATE###--> </body> </html> '; $_object = new MW_Template_Base($template, '<!--###$-->', '<!--$###-->'); $this->setExpectedException('MW_Template_Exception'); $_object->substitute(array('ITEM' => 'Title')); }