8 use \Magento\Framework\View\Asset\MergeStrategy\FileExists;
36 $this->mergerMock = $this->getMockForAbstractClass(\
Magento\Framework\View\
Asset\MergeStrategyInterface::class);
37 $this->dirMock = $this->getMockForAbstractClass(\
Magento\Framework\
Filesystem\Directory\ReadInterface::class);
40 ->method(
'getDirectoryRead')
42 ->will($this->returnValue($this->dirMock));
44 $this->resultAsset = $this->createMock(\
Magento\Framework\View\
Asset\File::class);
45 $this->resultAsset->expects($this->once())->method(
'getPath')->will($this->returnValue(
'foo/file'));
50 $this->dirMock->expects($this->once())->method(
'isExist')->with(
'foo/file')->will($this->returnValue(
true));
51 $this->mergerMock->expects($this->never())->method(
'merge');
52 $this->fileExists->merge([], $this->resultAsset);
57 $this->dirMock->expects($this->once())->method(
'isExist')->with(
'foo/file')->will($this->returnValue(
false));
58 $this->mergerMock->expects($this->once())->method(
'merge')->with([], $this->resultAsset);
59 $this->fileExists->merge([], $this->resultAsset);