public function getForm($pathOrContent, array $vars = array(), $cache = false) { $formClass = $this->formClass; return $this->inject(new $formClass($pathOrContent, $vars, $cache, $this)); }
/** * Testing adding a customized type */ public function testFactoryCustomType() { $factory = new Factory(); $factory->registerType('testing', '\\Gregwar\\Formidable\\Fields\\TextField'); $form = $factory->getForm(__DIR__ . '/files/factory/testing.html'); $html = "{$form}"; $this->assertContains('text', $html); $this->assertEquals('Hello', $form->test); }