public function testGetHtmlJs() { $selectId = 'testId'; $selectClass = 'testClass'; $selectTitle = 'testTitle'; $selectName = 'testName'; $options = ['testValue' => 'testLabel', 'selectedValue' => 'selectedLabel']; $selectedValue = 'selectedValue'; $this->select->setId($selectId); $this->select->setClass($selectClass); $this->select->setTitle($selectTitle); $this->select->setName($selectName); $this->select->setOptions($options); $this->select->setValue($selectedValue); $result = '<select name="testName" id="testId" class="testClass" title="testTitle" >' . '<option value="testValue" #{option_extra_attr_4016862802} >testLabel</option>' . '<option value="selectedValue" selected="selected" #{option_extra_attr_662265145} >selectedLabel</option>' . '</select>'; $this->select->setIsRenderToJsTemplate(true); $this->assertEquals($result, $this->select->getHtml()); }