public function registerType($type, $class)
{
$this->typeClasses[$type] = $class;
}
/** * 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); }