コード例 #1
0
 /**
  * @expectedException ymcHtmlFormDuplicateNameException
  */
 public function testDuplicateNameThrowsException()
 {
     $group = new ymcHtmlFormElementsGroupGeneric('group');
     $group->add(new ymcHtmlFormElementText('same'));
     $group->add(new ymcHtmlFormElementText('same'));
     $this->fail('Expected exception');
 }
コード例 #2
0
ファイル: form_generic.php プロジェクト: jou/ymc-components
 /**
  * @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');
 }