/** * MCAPI constructor. * @param \SendPulse\Mageia\Helper\Data $helper * @param \Magento\Framework\HTTP\Adapter\Curl $curl */ public function __construct(\SendPulse\Mageia\Helper\Data $helper, \Magento\Framework\HTTP\Adapter\Curl $curl) { $this->_helper = $helper; $this->_curl = $curl; $this->_apiKey = $helper->getApiKey(); $this->_secure = false; }
/** * @param \SendPulse\Mageia\Helper\Data $helper */ public function __construct(\SendPulse\Mageia\Helper\Data $helper, \SendPulse\Mageia\Model\Api $api) { $this->_helper = $helper; $this->_api = $api; if ($helper->getApiKey() && $helper->getApiSecret()) { $this->_options = $this->_api->info(); } }
/** * SPAPI constructor. * * @param \SendPulse\Mageia\Helper\Data $helper * @param \Magento\Framework\HTTP\Adapter\Curl $curl */ public function __construct(\SendPulse\Mageia\Helper\Data $helper, \Magento\Framework\HTTP\Adapter\Curl $curl, \Magento\Newsletter\Model\Session $session, \SendPulse\Mageia\Model\Logger\SendPulse $logger) { $this->_helper = $helper; $this->_curl = $curl; $this->_apiKey = $helper->getApiKey(); $this->_apiSecret = $helper->getApiSecret(); $this->_secure = false; $this->_session = $session; $this->_logger = $logger; $this->_token = $this->getApiToken(); }
public function testGetApiKey() { $this->_scopeMock->expects($this->once())->method('getValue')->willReturn('702d18c6593a882492bb972ee77738fc-us8'); $this->assertEquals($this->_helper->getApiKey(), '702d18c6593a882492bb972ee77738fc-us8'); }