public function testGetSubFormModels() { $form = new Admin_Form_Document_MultiSubForm('Admin_Form_Document_Title', 'TitleSub', new Application_Form_Validate_MultiSubForm_RepeatedLanguages()); $document = new Opus_Document(146); $form->populateFromModel($document); $form->appendSubForm(); $form->getSubForm('TitleSub2')->getElement('Language')->setValue('fra'); $form->getSubForm('TitleSub2')->getElement('Value')->setValue('Titel 3'); $titles = $form->getSubFormModels(); $this->assertEquals(3, count($titles)); $this->assertNotNull($titles[0]->getId()); $this->assertNotNull($titles[1]->getId()); $this->assertNull($titles[2]->getId()); // Neuer Titel noch nicht gespeichert (ohne ID) }