public function testAddingSubFormResetsBelongsToWithDifferentSubFormName() { $subForm = new SubForm(); $subForm->setName('quo')->addElement('text', 'foo'); $this->form->addSubForm($subForm, 'bar'); $this->assertEquals('bar', $subForm->foo->getBelongsTo()); }
/** * @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); }