Exemplo n.º 1
0
 public function testInit()
 {
     /* setup */
     @mkdir("tmp/");
     foreach (glob("tmp/*/*") as $file) {
         @unlink($file);
     }
     TestSuite::init();
 }
Exemplo n.º 2
0
 /** 
  * @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);
     }
 }