예제 #1
0
 /**
  * {@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;
 }
예제 #2
0
 /**
  * @param string $serviceName
  * @param mixed $expectedResult
  * @dataProvider getServiceLabelDataProvider
  */
 public function testGetServiceLabel($serviceName, $expectedResult)
 {
     $this->assertEquals($expectedResult, $this->_model->getServiceLabel($serviceName));
 }