public function testGetInstanceFromPost() { $document = new Opus_Document(146); $post = array('Files' => array('File0' => array('Id' => 126))); $form = Admin_Form_FileManager::getInstanceFromPost($post, $document); $this->assertInstanceOf('Admin_Form_FileManager', $form); $this->assertEquals(1, count($form->getSubForm('Files')->getSubForms())); $fileForm = $form->getSubForm('Files')->getSubForm('File0'); $this->assertNotNull($fileForm); $this->assertNull($fileForm->getElementValue('Id')); // Formular noch nicht befüllt }