示例#1
0
 /**
  * Test for Form::getFieldset method.
  *
  * @return void
  */
 public function testGetFieldset()
 {
     // Prepare the form.
     $form = new JFormInspector('form1');
     $this->assertThat($form->load(JFormDataHelper::$getFieldsetDocument), $this->isTrue(), 'Line:' . __LINE__ . ' XML string should load successfully.');
     $this->assertThat($form->getFieldset('bogus'), $this->equalTo(array()), 'Line:' . __LINE__ . ' A fieldset that does not exist should return an empty array.');
     $this->assertThat(count($form->getFieldset('params-basic')), $this->equalTo(4), 'Line:' . __LINE__ . ' There are 3 field elements in a fieldset and 1 field element marked with the fieldset attribute.');
 }