Skip to content

Commit e77da3f

Browse files
author
Roman Ganin
committed
Merge branch 'develop' of https://github.corp.ebay.com/magento-troll/magento2ce into develop
2 parents 8ccaf0a + 971a028 commit e77da3f

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

dev/tests/unit/testsuite/Magento/Framework/App/StaticResourceTest.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,11 @@ class StaticResourceTest extends \PHPUnit_Framework_TestCase
5555
*/
5656
private $object;
5757

58+
/**
59+
* @var \Magento\Framework\View\Asset\MinifyService|\PHPUnit_Framework_MockObject_MockObject
60+
*/
61+
private $minifyService;
62+
5863
protected function setUp()
5964
{
6065
$this->state = $this->getMock('Magento\Framework\App\State', [], [], '', false);
@@ -67,6 +72,11 @@ protected function setUp()
6772
$this->configLoader = $this->getMock(
6873
'Magento\Framework\App\ObjectManager\ConfigLoader', [], [], '', false
6974
);
75+
$this->minifyService = $this->getMockBuilder('Magento\Framework\View\Asset\MinifyService')
76+
->disableOriginalConstructor()
77+
->setMethods(['getAssets'])
78+
->getMock();
79+
7080
$this->object = new \Magento\Framework\App\StaticResource(
7181
$this->state,
7282
$this->response,
@@ -76,6 +86,7 @@ protected function setUp()
7686
$this->moduleList,
7787
$this->objectManager,
7888
$this->configLoader,
89+
$this->minifyService,
7990
$this->getMockForAbstractClass('\Magento\Framework\View\DesignInterface')
8091
);
8192
}
@@ -142,6 +153,7 @@ public function testLaunch(
142153
$this->response->expects($this->once())
143154
->method('setFilePath')
144155
->with('resource/file.css');
156+
$this->minifyService->expects($this->once())->method('getAssets')->willReturnArgument(0);
145157
$this->object->launch();
146158
}
147159

0 commit comments

Comments
 (0)