Пример #1
0
 public function setUp()
 {
     $file = __DIR__ . '/../fixtures/form_test.form.yml';
     $loader = new YamlFileLoader($file);
     $this->metaForm = new FormMetaData();
     $loader->loadFormMetadata($this->metaForm);
 }
Пример #2
0
 public function testFileStructureLoaded()
 {
     $this->setExpectedException('BF13\\Component\\Form\\Exception\\FormException');
     $file = __FILE__;
     $loader = new YamlFileLoader($file);
     $metaData = new FormMetaData();
     $loader->loadFormMetaData($metaData);
 }
Пример #3
0
 public function setUp()
 {
     $file = __DIR__ . '/../fixtures/form_test.form.yml';
     $options = array();
     $options['fields']['field2']['choice']['label'] = 'myLabel';
     $options['fields']['field2']['choice']['choices'] = array('aa');
     $options['fields']['field3']['subform']['metadata']['fields']['format_numero']['value_list'] = array('label' => 'add_demo', 'source' => 'override_numero_source');
     $loader = new YamlFileLoader($file);
     $this->metaForm = new FormMetaData(null, $options);
     $loader->loadFormMetadata($this->metaForm);
 }