File tree Expand file tree Collapse file tree 3 files changed +3
-11
lines changed
app/code/Magento/ConfigurableProduct
Controller/Adminhtml/Product
Test/Unit/Controller/Adminhtml/Product
view/adminhtml/templates/catalog/product/attribute/new Expand file tree Collapse file tree 3 files changed +3
-11
lines changed Original file line number Diff line number Diff line change @@ -34,12 +34,10 @@ public function __construct(
34
34
*/
35
35
public function execute ()
36
36
{
37
- $ this ->_view ->loadLayout ('popup ' );
38
37
$ this ->productBuilder ->build ($ this ->getRequest ());
39
38
$ attributeBlock = $ this ->_view ->getLayout ()->createBlock (
40
39
'Magento\ConfigurableProduct\Block\Adminhtml\Product\Attribute\NewAttribute\Product\Created '
41
40
);
42
- $ this ->_addContent ($ attributeBlock );
43
- $ this ->_view ->renderLayout ();
41
+ $ this ->getResponse ()->setBody ($ attributeBlock ->toHtml ());
44
42
}
45
43
}
Original file line number Diff line number Diff line change @@ -95,12 +95,9 @@ public function testExecute()
95
95
->setMethods (['setIndex ' , 'toHtml ' ])
96
96
->getMock ();
97
97
98
- $ this ->view ->expects ($ this ->once ())->method ('loadLayout ' )->with ('popup ' )->willReturnSelf ();
99
98
$ this ->productBuilder ->expects ($ this ->once ())->method ('build ' )->with ($ this ->request )->willReturn ($ product );
100
- $ this ->view ->expects ($ this ->any ())->method ('getLayout ' )->willReturn ($ layout );
99
+ $ this ->view ->expects ($ this ->once ())->method ('getLayout ' )->willReturn ($ layout );
101
100
$ layout ->expects ($ this ->once ())->method ('createBlock ' )->willReturn ($ block );
102
- $ layout ->expects ($ this ->once ())->method ('setChild ' )->willReturnSelf ();
103
- $ this ->view ->expects ($ this ->any ())->method ('renderLayout ' )->willReturnSelf ();
104
101
105
102
$ this ->controller ->execute ();
106
103
}
Original file line number Diff line number Diff line change 18
18
$('#create_new_attribute').modal('closeModal');
19
19
20
20
})(window.parent.jQuery);
21
- </script>
22
- <div class="a-center">
23
- <?php echo $ block ->getCloseButtonHtml () ?>
24
- </div>
21
+ </script>
You can’t perform that action at this time.
0 commit comments