9 use \Magento\Framework\App\View\Asset\MaterializationStrategy\Symlink;
19 private $symlinkPublisher;
23 $this->symlinkPublisher =
new Symlink;
30 $targetDir = $this->getMockBuilder(\
Magento\Framework\
Filesystem\Directory\WriteInterface::class)
32 $sourcePath =
'source/path/file';
33 $destinationPath =
'destination/path/file';
36 ->method(
'createSymlink')
43 $this->assertTrue($this->symlinkPublisher->publishFile(
$rootDir, $targetDir, $sourcePath, $destinationPath));
51 $asset = $this->getMockBuilder(\
Magento\Framework\
View\
Asset\LocalInterface::class)
54 $asset->expects($this->once())
55 ->method(
'getSourceFile')
57 $this->assertEquals($expectation, $this->symlinkPublisher->isSupported($asset));
66 [
'path/to/file',
true],
const TMP_MATERIALIZATION_DIR
testIsSupported($path, $expectation)