Exemple #1
0
 /**
  * MCAPI constructor.
  * @param \Ebizmarts\MageMonkey\Helper\Data $helper
  * @param \Magento\Framework\HTTP\Adapter\Curl $curl
  */
 public function __construct(\Ebizmarts\MageMonkey\Helper\Data $helper, \Magento\Framework\HTTP\Adapter\Curl $curl)
 {
     $this->_helper = $helper;
     $this->_curl = $curl;
     $this->_apiKey = $helper->getApiKey();
     $this->_secure = false;
 }
 /**
  * @param \Ebizmarts\MageMonkey\Helper\Data $helper
  */
 public function __construct(\Ebizmarts\MageMonkey\Helper\Data $helper)
 {
     $this->_helper = $helper;
     $this->_api = new \Ebizmarts\MageMonkey\Model\Api(array(), $helper);
     if ($helper->getApiKey()) {
         $this->_options = $this->_api->lists();
     }
 }
 /**
  * @param \Ebizmarts\MageMonkey\Helper\Data $helper
  */
 public function __construct(\Ebizmarts\MageMonkey\Helper\Data $helper, \Ebizmarts\MageMonkey\Model\Api $api)
 {
     $this->_helper = $helper;
     $this->_api = $api;
     if ($helper->getApiKey()) {
         $this->_options = $this->_api->info();
     }
 }
Exemple #4
0
 /**
  * @param array $args
  * @param \Ebizmarts\MageMonkey\Helper\Data $helper
  */
 public function __construct(array $args, \Ebizmarts\MageMonkey\Helper\Data $helper)
 {
     $apiKey = !isset($args['apiKey']) ? $helper->getApiKey() : $args['apiKey'];
     $this->_mcapi = new \Ebizmarts\MageMonkey\Model\MCAPI($apiKey, $helper);
 }
 public function testGetApiKey()
 {
     $this->_scopeMock->expects($this->once())->method('getValue')->willReturn('702d18c6593a882492bb972ee77738fc-us8');
     $this->assertEquals($this->_helper->getApiKey(), '702d18c6593a882492bb972ee77738fc-us8');
 }