Пример #1
0
 public function testGetElement_ByName_or_ByPosition_or_LastElement()
 {
     $this->form->addElement('button')->setName('myButton1');
     // ByName
     $formelement_object = $this->form->getElement('myButton1');
     $this->assertIdentical('myButton1', $formelement_object->getName());
     // ByPosition
     $formelement_object = $this->form->getElement('0');
     $this->assertIdentical('myButton1', $formelement_object->getName());
     // Default Value null as param
     $formelement_object = $this->form->getElement();
     $this->assertIdentical('myButton1', $formelement_object->getName());
 }