Beispiel #1
0
 public function testAddFormExcludedAttribute()
 {
     $block = $this->getMock('Magento\\Backend\\Block\\Template', array('getFormExcludedFieldList', 'setFormExcludedFieldList'), array(), '', false);
     $block->expects($this->once())->method('getFormExcludedFieldList')->will($this->returnValue(array('field')));
     $block->expects($this->once())->method('setFormExcludedFieldList')->with(array('field', 'recurring_payment'));
     $this->_event->expects($this->once())->method('getObject')->will($this->returnValue($block));
     $this->_testModel->addFormExcludedAttribute($this->_observer);
 }
Beispiel #2
0
 public function testAddRecurringPaymentIdsToSession()
 {
     $this->_prepareRecurringPayments();
     $this->_quote->expects($this->once())->method('import')->will($this->returnValue(array($this->_payment)));
     $this->_payment->expects($this->once())->method('isValid')->will($this->returnValue(true));
     $this->_payment->expects($this->once())->method('submit');
     $this->_testModel->submitRecurringPayments($this->_observer);
     $this->_testModel->addRecurringPaymentIdsToSession();
 }