Ejemplo n.º 1
0
 /**
  * Tests to finish a file with improper nesting. An exception should be thrown.
  */
 public function testFinishWithImproperNesting()
 {
     $generator = new ezcPhpGenerator(dirname(__FILE__) . '/data/generator_test.php', false, true);
     $generator->appendIf('$brush == true');
     try {
         $generator->finish();
     } catch (ezcPhpGeneratorException $e) {
         // eat, this is expected.
         return;
     }
     $this->fail("Finished file with improper nesting without getting an exception.");
 }