public function testGetTypes() { $optionArray = array(array('value' => 'multiselect', 'label' => __('Multiple Select')), array('value' => 'select', 'label' => __('Dropdown'))); $expectedResult = ['multiselect', 'select']; $this->inputType->expects($this->once())->method('toOptionArray')->will($this->returnValue($optionArray)); $this->assertEquals($expectedResult, $this->model->getTypes()); }
public function testToOptionArrayValid() { $expects = [['value' => 'multiselect', 'label' => 'Multiple Select'], ['value' => 'select', 'label' => 'Dropdown']]; $this->assertEquals($expects, $this->_model->toOptionArray()); }
/** * {@inheritdoc} */ public function getItems() { return array_map(function ($inputType) { return $inputType['value']; }, $this->inputType->toOptionArray()); }