Example #1
0
 /**
  * @group ZF-4435
  */
 public function testShouldCreateAppropriateIdsForElementsInSubForms()
 {
     $form = new DojoForm();
     $form->setDecorators(array('FormElements', array('TabContainer', array('id' => 'tabContainer', 'style' => 'width: 600px; height: 300px;', 'dijitParams' => array('tabPosition' => 'top'))), 'DijitForm'));
     $sliderForm = new DojoSubForm();
     $sliderForm->setAttribs(array('name' => 'slidertab', 'legend' => 'Slider Elements'));
     $sliderForm->addElement('HorizontalSlider', 'slide1', array('label' => 'Slide me:', 'minimum' => 0, 'maximum' => 25, 'discreteValues' => 10, 'style' => 'width: 450px;', 'topDecorationDijit' => 'HorizontalRuleLabels', 'topDecorationLabels' => array('0%', '50%', '100%'), 'topDecorationParams' => array('style' => 'padding-bottom: 20px;')));
     $form->addSubForm($sliderForm, 'slidertab')->setView($this->getView());
     $html = $form->render();
     $this->assertContains('id="slidertab-slide1-slider"', $html);
     $this->assertContains('id="slidertab-slide1-slider-topDecoration"', $html);
     $this->assertContains('id="slidertab-slide1-slider-topDecoration-labels"', $html);
 }