Esempio n. 1
0
 public function testAssignData()
 {
     $details['payable_to'] = 'payable';
     $details['mailing_address'] = '*****@*****.**';
     $this->_object->setStore(1);
     $this->_scopeConfig->expects($this->any())->method('getValue')->willReturnMap([['payment/checkmo/payable_to', 'store', 1, 'payable'], ['payment/checkmo/mailing_address', 'store', 1, '*****@*****.**']]);
     $instance = $this->getMock('Magento\\Payment\\Model\\Info', ['setAdditionalData'], [], '', false);
     $instance->expects($this->once())->method('setAdditionalData')->with(serialize($details));
     $this->_object->setData('info_instance', $instance);
     $this->_object->assignData('');
 }
 public function testGetMailingAddress()
 {
     $this->_object->setStore(1);
     $this->_scopeConfig->expects($this->once())->method('getValue')->with('payment/checkmo/mailing_address', 'store', 1)->willReturn('*****@*****.**');
     $this->assertEquals('*****@*****.**', $this->_object->getMailingAddress());
 }