File tree Expand file tree Collapse file tree 5 files changed +40
-23
lines changed
lib/internal/Magento/Framework/App Expand file tree Collapse file tree 5 files changed +40
-23
lines changed Original file line number Diff line number Diff line change 65
65
<preference for =" Magento\Framework\App\Router\PathConfigInterface" type =" Magento\Store\Model\PathConfig" />
66
66
<type name =" Magento\Framework\App\ActionInterface" >
67
67
<plugin name =" storeCheck" type =" Magento\Store\App\Action\Plugin\StoreCheck" />
68
- <plugin name =" designLoader" type =" Magento\Framework\App\Action\Plugin\Design" />
69
- <plugin name =" eventDispatch" type =" Magento\Framework\App\Action\Plugin\EventDispatchPlugin" />
70
- <plugin name =" actionFlagNoDispatch" type =" Magento\Framework\App\Action\Plugin\ActionFlagNoDispatchPlugin" />
71
68
</type >
72
69
<type name =" Magento\Framework\Url\SecurityInfo" >
73
70
<plugin name =" storeUrlSecurityInfo" type =" Magento\Store\Url\Plugin\SecurityInfo" />
Original file line number Diff line number Diff line change 1774
1774
</argument >
1775
1775
</arguments >
1776
1776
</type >
1777
+ <type name =" Magento\Framework\App\ActionInterface" >
1778
+ <plugin name =" designLoader" type =" Magento\Framework\App\Action\Plugin\LoadDesignPlugin" />
1779
+ <plugin name =" eventDispatch" type =" Magento\Framework\App\Action\Plugin\EventDispatchPlugin" />
1780
+ <plugin name =" actionFlagNoDispatch" type =" Magento\Framework\App\Action\Plugin\ActionFlagNoDispatchPlugin" />
1781
+ </type >
1777
1782
<type name =" Magento\Framework\App\ScopeResolverPool" >
1778
1783
<arguments >
1779
1784
<argument name =" scopeResolvers" xsi : type =" array" >
Original file line number Diff line number Diff line change 16
16
/**
17
17
* Handling Exceptions on Design Loading
18
18
*/
19
- class Design
19
+ class LoadDesignPlugin
20
20
{
21
21
/**
22
22
* @var DesignLoader
Load Diff This file was deleted.
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 \Framework \App \Test \Unit \Action \Plugin ;
7
+
8
+ use Magento \Framework \App \Action \Action ;
9
+ use Magento \Framework \App \Action \Plugin \LoadDesignPlugin ;
10
+ use Magento \Framework \App \ActionInterface ;
11
+ use Magento \Framework \Message \ManagerInterface ;
12
+ use Magento \Framework \View \DesignLoader ;
13
+ use PHPUnit \Framework \MockObject \MockObject ;
14
+ use PHPUnit \Framework \TestCase ;
15
+
16
+ class DesignTest extends TestCase
17
+ {
18
+ public function testBeforeExecute ()
19
+ {
20
+ /** @var MockObject|ActionInterface $actionMock */
21
+ $ actionMock = $ this ->createMock (Action::class);
22
+
23
+ /** @var MockObject|DesignLoader $designLoaderMock */
24
+ $ designLoaderMock = $ this ->createMock (DesignLoader::class);
25
+
26
+ /** @var MockObject|ManagerInterface $messageManagerMock */
27
+ $ messageManagerMock = $ this ->createMock (ManagerInterface::class);
28
+
29
+ $ plugin = new LoadDesignPlugin ($ designLoaderMock , $ messageManagerMock );
30
+
31
+ $ designLoaderMock ->expects ($ this ->once ())->method ('load ' );
32
+ $ plugin ->beforeExecute ($ actionMock );
33
+ }
34
+ }
You can’t perform that action at this time.
0 commit comments