File tree Expand file tree Collapse file tree 2 files changed +55
-1
lines changed
app/code/Magento/Sales/view/adminhtml/templates/order/create/billing/method
dev/tests/integration/testsuite/Magento/Sales/Block/Adminhtml/Order/Create/Billing/Method Expand file tree Collapse file tree 2 files changed +55
-1
lines changed Original file line number Diff line number Diff line change 39
39
</dl>
40
40
</div>
41
41
<script>
42
- require(["Magento_Sales/order/create/form"], function(){
42
+ require([
43
+ 'mage/apply/main',
44
+ 'Magento_Sales/order/create/form'
45
+ ], function(mage) {
46
+ mage.apply();
43
47
<?php if ($ _methodsCount != 1 ):?>
44
48
order.setPaymentMethod('<?= /* @escapeNotVerified */ $ block ->getSelectedMethodCode () ?> ');
45
49
<?php endif ; ?>
Original file line number Diff line number Diff line change
1
+ <?php
2
+ /**
3
+ * Copyright © Magento, Inc. All rights reserved.
4
+ * See COPYING.txt for license details.
5
+ */
6
+ namespace Magento \Sales \Block \Adminhtml \Order \Create \Billing \Method ;
7
+
8
+ use Magento \Framework \ObjectManagerInterface ;
9
+ use Magento \Framework \View \LayoutInterface ;
10
+ use Magento \TestFramework \Helper \Bootstrap ;
11
+
12
+ /**
13
+ * Test for order billing method form.
14
+ *
15
+ * @magentoAppArea adminhtml
16
+ */
17
+ class FormTest extends \PHPUnit \Framework \TestCase
18
+ {
19
+ /**
20
+ * @var ObjectManagerInterface
21
+ */
22
+ private $ objectManager ;
23
+
24
+ /**
25
+ * @var LayoutInterface
26
+ */
27
+ private $ layout ;
28
+
29
+ /**
30
+ * @inheritdoc
31
+ */
32
+ protected function setUp ()
33
+ {
34
+ $ this ->objectManager = Bootstrap::getObjectManager ();
35
+ $ this ->layout = $ this ->objectManager ->get (LayoutInterface::class);
36
+ }
37
+
38
+ /**
39
+ * Checks if billing method form generates contentUpdated event
40
+ * to parse elements with data-mage-init attributes.
41
+ */
42
+ public function testContentUpdated ()
43
+ {
44
+ /** @var Form $block */
45
+ $ block = $ this ->layout ->createBlock (Form::class, 'order_billing_method ' );
46
+ $ block ->setTemplate ('Magento_Sales::order/create/billing/method/form.phtml ' );
47
+
48
+ $ this ->assertContains ('mage.apply() ' , $ block ->toHtml ());
49
+ }
50
+ }
You can’t perform that action at this time.
0 commit comments