public function testFormGenerator()
 {
     $generator = new FormGenerator();
     $generator->template = 'default';
     $generator->modelClass = 'yiiunit\\extensions\\gii\\Profile';
     $generator->viewName = 'profile';
     $generator->viewPath = '@yiiunit/runtime';
     $valid = $generator->validate();
     $this->assertTrue($valid, 'Validation failed: ' . print_r($generator->getErrors(), true));
     $this->assertNotEmpty($generator->generate());
 }
Exemple #2
0
 public function testFormGenerator()
 {
     $generator = new FormGenerator();
     $generator->template = 'default';
     $generator->modelClass = 'yiiunit\\extensions\\gii\\Profile';
     $generator->viewName = 'profile';
     $generator->viewPath = '@yiiunit/runtime';
     if ($generator->validate()) {
         $generator->generate();
     } else {
         print_r($generator->getErrors());
     }
 }