Пример #1
0
 public function testUnrequiredFirstNames()
 {
     $session = new Zend_Session_Namespace('Publish');
     $session->documentType = 'all';
     $form = new Publish_Form_PublishingSecond($this->_logger);
     $name = 'PersonAuthor';
     $required = true;
     $formElement = 'text';
     $datatype = 'Person';
     $multiplicity = 1;
     $element = new Publish_Model_FormElement($form, $name, $required, $formElement, $datatype, $multiplicity);
     $element->initGroup();
     $subformElements = $element->getSubFormElements();
     foreach ($subformElements as $sub) {
         /* @var $sub Zend_Form_Element */
         if ($sub->getName() == 'PersonAuthorFirstName') {
             $this->assertFalse($sub->isRequired());
         }
     }
 }