Ejemplo n.º 1
0
 public function testAddingSubFormResetsBelongsToWithDifferentSubFormName()
 {
     $subForm = new SubForm();
     $subForm->setName('quo')->addElement('text', 'foo');
     $this->form->addSubForm($subForm, 'bar');
     $this->assertEquals('bar', $subForm->foo->getBelongsTo());
 }
Ejemplo n.º 2
0
 /**
  * @group ZF-7054
  */
 public function testCustomIdSupersedesElementId()
 {
     $form = new SubForm();
     $form->setName('bar')
          ->setView($this->getView());
     $html = $this->decorator->setElement($form)
                             ->setOption('id', 'foo-id')
                             ->render('content');
     $this->assertContains('foo-id', $html);
 }