public function testModuleGenerator()
 {
     $generator = new ModuleGenerator();
     $generator->template = 'default';
     $generator->moduleID = 'test';
     $generator->moduleClass = 'app\\modules\\test\\Module';
     $valid = $generator->validate();
     $this->assertTrue($valid, 'Validation failed: ' . print_r($generator->getErrors(), true));
     $this->assertNotEmpty($generator->generate());
 }
Example #2
0
 public function testModuleGenerator()
 {
     $generator = new ModuleGenerator();
     $generator->template = 'default';
     $generator->moduleID = 'test';
     $generator->moduleClass = 'app\\modules\\test\\Module';
     if ($generator->validate()) {
         $generator->generate();
     } else {
         print_r($generator->getErrors());
     }
 }