@@ -58,6 +58,11 @@ class StaticResourceTest extends \PHPUnit_Framework_TestCase
58
58
*/
59
59
private $ object ;
60
60
61
+ /**
62
+ * @var \Psr\Log\LoggerInterface|\PHPUnit_Framework_MockObject_MockObject
63
+ */
64
+ private $ logger ;
65
+
61
66
protected function setUp ()
62
67
{
63
68
$ this ->state = $ this ->getMock ('Magento\Framework\App\State ' , [], [], '' , false );
@@ -67,6 +72,7 @@ protected function setUp()
67
72
$ this ->assetRepo = $ this ->getMock ('Magento\Framework\View\Asset\Repository ' , [], [], '' , false );
68
73
$ this ->moduleList = $ this ->getMock ('Magento\Framework\Module\ModuleList ' , [], [], '' , false );
69
74
$ this ->objectManager = $ this ->getMockForAbstractClass ('Magento\Framework\ObjectManagerInterface ' );
75
+ $ this ->logger = $ this ->getMockForAbstractClass ('Psr\Log\LoggerInterface ' );
70
76
$ this ->configLoader = $ this ->getMock (
71
77
'Magento\Framework\App\ObjectManager\ConfigLoader ' , [], [], '' , false
72
78
);
@@ -193,6 +199,10 @@ public function testLaunchWrongPath()
193
199
194
200
public function testCatchExceptionDeveloperMode ()
195
201
{
202
+ $ this ->objectManager ->expects ($ this ->once ())
203
+ ->method ('get ' )
204
+ ->with ('Psr\Log\LoggerInterface ' )
205
+ ->willReturn ($ this ->logger );
196
206
$ bootstrap = $ this ->getMockBuilder (Bootstrap::class)->disableOriginalConstructor ()->getMock ();
197
207
$ bootstrap ->expects ($ this ->once ())->method ('isDeveloperMode ' )->willReturn (true );
198
208
$ exception = new \Exception ('Error: nothing works ' );
0 commit comments