Пример #1
0
 public function testLoad_ReplaceDescendent(JForm $form)
 {
     // Check the replacement data loads ok.
     $this->assertThat($form->load(JFormDataHelper::$loadReplacementDocument), $this->isTrue(), 'Line:' . __LINE__ . ' XML string should load successfully.');
     // Check that replaced options are present
     $this->assertThat(count($form->getXML()->xpath('/form/fields/fields[@name="params"]/field[@name="show_title"]/option')), $this->equalTo(3), 'Line:' . __LINE__ . ' The show_title in the params group is supposed to have 3 descendant nodes.');
 }