public function testControllerGenerator()
 {
     $generator = new ControllerGenerator();
     $generator->template = 'default';
     $generator->controllerClass = 'app\\runtime\\TestController';
     $valid = $generator->validate();
     $this->assertTrue($valid, 'Validation failed: ' . print_r($generator->getErrors(), true));
     $this->assertNotEmpty($generator->generate());
 }
Example #2
0
 public function testControllerGenerator()
 {
     $generator = new ControllerGenerator();
     $generator->template = 'default';
     $generator->controller = 'test';
     if ($generator->validate()) {
         $generator->generate();
     } else {
         print_r($generator->getErrors());
     }
 }