/** * {@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; }
public function testGetAvailableServices() { $this->assertEquals(['service_one', 'service_two'], $this->_model->getAvailableServices()); }