public function testExecuteNever()
 {
     $dataObject = new DataObject([PaymentInterface::KEY_ADDITIONAL_DATA => []]);
     $paymentModel = $this->getMock(InfoInterface::class);
     $paymentModel->expects(static::never())->method('setAdditionalInformation');
     $observer = $this->getPreparedObserverWithMap([[AbstractDataAssignObserver::DATA_CODE, $dataObject], [AbstractDataAssignObserver::MODEL_CODE, $paymentModel]]);
     $vaultEnableAssigner = new VaultEnableAssigner();
     $vaultEnableAssigner->execute($observer);
 }
Пример #2
0
 /**
  * @param string $activeCode
  * @param boolean $expectedBool
  * @dataProvider booleanDataProvider
  */
 public function testExecute($activeCode, $expectedBool)
 {
     $dataObject = new DataObject([VaultConfigProvider::IS_ACTIVE_CODE => $activeCode]);
     $paymentModel = $this->getMock(InfoInterface::class);
     $paymentModel->expects(static::once())->method('setAdditionalInformation')->with(VaultConfigProvider::IS_ACTIVE_CODE, $expectedBool);
     $observer = $this->getPreparedObserverWithMap([[AbstractDataAssignObserver::DATA_CODE, $dataObject], [AbstractDataAssignObserver::MODEL_CODE, $paymentModel]]);
     $vaultEnableAssigner = new VaultEnableAssigner();
     $vaultEnableAssigner->execute($observer);
 }