public function testCompile() { define('file', __DIR__ . '/generated/' . __CLASS__ . '.php'); $gen = new Generator(); $this->assertFalse(file_Exists(file)); $gen->addDirectory(__DIR__ . '/input'); $gen->setOutput(file); $gen->generate(); $this->assertTrue(file_Exists(file)); // add mockup cache class require __DIR__ . "/input/cache_class.php"; }
public function testCompile() { $gen = new Generator(); $file = __DIR__ . '/generated/' . __CLASS__ . '.php'; $this->assertFalse(file_Exists($file)); $gen->addDirectory(__DIR__ . '/input'); $gen->setNamespace(__CLASS__); $gen->setOutput($file); $gen->generate(); $this->assertTrue(file_Exists($file)); require $file; // add mockup cache class require __DIR__ . "/input/cache_class.php"; }