/**
  * @expectedException ymcHtmlFormDuplicateNameException
  */
 public function testDuplicateNameThrowsException()
 {
     $group = new ymcHtmlFormElementsGroupGeneric('group');
     $group->add(new ymcHtmlFormElementText('same'));
     $group->add(new ymcHtmlFormElementText('same'));
     $this->fail('Expected exception');
 }
Exemple #2
0
 /**
  * @expectedException ymcHtmlFormDuplicateNameException
  */
 public function testDuplicateNameThrowsException()
 {
     $group1 = new ymcHtmlFormElementsGroupGeneric('group1');
     $group1->add(new ymcHtmlFormElementText('same'));
     $group2 = new ymcHtmlFormElementsGroupGeneric('group2');
     $group2->add(new ymcHtmlFormElementText('same'));
     $form = new ymcHtmlFormGeneric();
     $form->group->add($group1);
     $form->group->add($group2);
     $form->init();
     $this->fail('Expected exception');
 }