public function testInit() { /* setup */ @mkdir("tmp/"); foreach (glob("tmp/*/*") as $file) { @unlink($file); } TestSuite::init(); }
/** * @dataProvider tplProvider * */ function testInvalidTemplates($tpl) { TestSuite::init(); Haanga_Compiler::setOption('allow_exec', FALSE); try { Haanga::Load($tpl); $this->assertTrue(FALSE); } catch (Haanga_Compiler_Exception $e) { $i = preg_match("/in.*:[0-9]+/", $e->getMessage()); $this->assertEquals(1, $i); } }