Ejemplo n.º 1
0
 /**
  * @expectedException \Magento\Framework\Model\Exception
  */
 public function testInitialize()
 {
     $order = $this->getMock('Magento\\Sales\\Model\\Order', [], [], '', false);
     $this->infoInstance->expects($this->any())->method('getOrder')->will($this->returnValue($order));
     $this->paypalConfig->expects($this->once())->method('getBuildNotationCode')->will($this->returnValue('build notation code'));
     $this->payflowRequest->expects($this->once())->method('setData')->with('BNCODE', 'build notation code')->will($this->returnSelf());
     $this->model->initialize(\Magento\Paypal\Model\Config::PAYMENT_ACTION_AUTH, new \Magento\Framework\Object());
 }
Ejemplo n.º 2
0
 /**
  * @param bool $expectedResult
  * @param string $configResult
  * @dataProvider dataProviderForTestIsActive
  */
 public function testIsActive($expectedResult, $configResult)
 {
     $storeId = 15;
     $this->scopeConfigMock->expects($this->once())->method('getValue')->with("payment/payflow_link/active", ScopeInterface::SCOPE_STORE, $storeId)->willReturn($configResult);
     $this->assertEquals($expectedResult, $this->model->isActive($storeId));
 }