Exemplo n.º 1
0
 /**
  * @group ZF2-336
  */
 public function testCanAddFileEnctypeFromCollectionAttribute()
 {
     $file = new Element\File('file_resource');
     $file->setOptions(array())->setLabel('File');
     $fileCollection = new Element\Collection('collection');
     $fileCollection->setOptions(array('count' => 2, 'allow_add' => false, 'allow_remove' => false, 'target_element' => $file));
     $this->form->add($fileCollection);
     $this->form->prepare();
     $enctype = $this->form->getAttribute('enctype');
     $this->assertNotEmpty($enctype);
     $this->assertEquals($enctype, 'multipart/form-data');
 }