File tree Expand file tree Collapse file tree 2 files changed +26
-1
lines changed
dev/tests/integration/testsuite/Magento
Paypal/Model/Config/Structure/Reader/_files/expected Expand file tree Collapse file tree 2 files changed +26
-1
lines changed Original file line number Diff line number Diff line change 105
105
<source_model >Magento\Config\Model\Config\Source\Yesno</source_model >
106
106
<config_path >payment/payflowpro_cc_vault/active</config_path >
107
107
<requires >
108
- <group id =" paypal_payflow_required " />
108
+ <group id =" paypal_payflow_api_settings " />
109
109
</requires >
110
110
</field >
111
111
</group >
Original file line number Diff line number Diff line change 6
6
namespace Magento \Sales \Model \AdminOrder ;
7
7
8
8
use Magento \TestFramework \Helper \Bootstrap ;
9
+ use Magento \Sales \Model \Order ;
10
+ use Magento \Framework \Registry ;
9
11
10
12
/**
11
13
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
@@ -120,6 +122,29 @@ public function testInitFromOrderCcInformationDeleted()
120
122
$ this ->assertNull ($ payment ->getCcLast4 ());
121
123
}
122
124
125
+ /**
126
+ * @magentoDataFixture Magento/Sales/_files/order_paid_with_payflowpro.php
127
+ */
128
+ public function testInitFromOrderWithEmptyPaymentDetails ()
129
+ {
130
+ /** @var $objectManager \Magento\TestFramework\ObjectManager */
131
+ $ objectManager = Bootstrap::getObjectManager ();
132
+ /** @var $order \Magento\Sales\Model\Order */
133
+ $ order = $ objectManager ->create (Order::class);
134
+ $ order ->loadByIncrementId ('100000001 ' );
135
+
136
+ $ objectManager ->get (Registry::class)
137
+ ->unregister ('rule_data ' );
138
+
139
+ $ payment = $ this ->_model ->initFromOrder ($ order )
140
+ ->getQuote ()
141
+ ->getPayment ();
142
+
143
+ static ::assertEmpty ($ payment ->getMethod ());
144
+ static ::assertEmpty ($ payment ->getAdditionalInformation ());
145
+ static ::assertEmpty ($ payment ->getAdditionalData ());
146
+ }
147
+
123
148
/**
124
149
* @magentoAppIsolation enabled
125
150
*/
You can’t perform that action at this time.
0 commit comments