/** * {@inheritdoc} */ public function toOptionArray() { if ($this->_options === null) { $this->_options = []; foreach ($this->_importConfig->getAvailableServices() as $serviceName) { $this->_options[] = ['label' => $this->_importConfig->getServiceLabel($serviceName), 'value' => $serviceName]; } } return $this->_options; }
/** * @param string $serviceName * @param mixed $expectedResult * @dataProvider getServiceLabelDataProvider */ public function testGetServiceLabel($serviceName, $expectedResult) { $this->assertEquals($expectedResult, $this->_model->getServiceLabel($serviceName)); }