This repository was archived by the owner on Apr 29, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -65,6 +65,31 @@ protected function setUp()
65
65
]);
66
66
}
67
67
68
+ /**
69
+ * Checks a test case, when Signifyd guarantee was canceled.
70
+ *
71
+ * @covers \Magento\Signifyd\Model\Guarantee\CancelingService::cancelForOrder
72
+ * @magentoDataFixture Magento/Signifyd/_files/case.php
73
+ * @magentoConfigFixture current_store fraud_protection/signifyd/active 1
74
+ */
75
+ public function testCancelForOrderWithCanceledGuarantee ()
76
+ {
77
+ /** @var CaseRepositoryInterface $caseRepository */
78
+ $ caseRepository = $ this ->objectManager ->get (CaseRepositoryInterface::class);
79
+ $ caseEntity = $ caseRepository ->getByCaseId (self ::$ caseId );
80
+ $ caseEntity ->setGuaranteeDisposition (CaseInterface::GUARANTEE_CANCELED );
81
+ $ caseRepository ->save ($ caseEntity );
82
+
83
+ $ this ->gateway ->expects (self ::never ())
84
+ ->method ('cancelGuarantee ' );
85
+
86
+ $ this ->logger ->expects (self ::never ())
87
+ ->method ('error ' );
88
+
89
+ $ result = $ this ->service ->cancelForOrder ($ caseEntity ->getOrderId ());
90
+ self ::assertFalse ($ result );
91
+ }
92
+
68
93
/**
69
94
* Checks a test case, when Signifyd gateway throws an exception.
70
95
*
You can’t perform that action at this time.
0 commit comments