File tree 1 file changed +24
-0
lines changed
app/code/Magento/Catalog/Test/Unit/Model/View/Asset 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -97,6 +97,30 @@ public function testGetPath($filePath, $miscParams)
97
97
);
98
98
}
99
99
100
+ /**
101
+ * @param string $filePath
102
+ * @param array $miscParams
103
+ * @dataProvider getPathDataProvider
104
+ */
105
+ public function testGetNotUnixPath ($ filePath , $ miscParams )
106
+ {
107
+ $ imageModel = new Image (
108
+ $ this ->mediaConfig ,
109
+ $ this ->imageContext ,
110
+ $ this ->encryptor ,
111
+ $ filePath ,
112
+ $ miscParams
113
+ );
114
+ $ absolutePath = 'C:\www\magento2ce\pub\media\catalog\product ' ;
115
+ $ hashPath = md5 (implode ('_ ' , $ miscParams ));
116
+ $ this ->imageContext ->expects ($ this ->once ())->method ('getPath ' )->willReturn ($ absolutePath );
117
+ $ this ->encryptor ->expects ($ this ->once ())->method ('hash ' )->willReturn ($ hashPath );
118
+ $ this ->assertEquals (
119
+ $ absolutePath . DIRECTORY_SEPARATOR . 'cache ' . DIRECTORY_SEPARATOR . $ hashPath . $ filePath ,
120
+ $ imageModel ->getPath ()
121
+ );
122
+ }
123
+
100
124
/**
101
125
* @param string $filePath
102
126
* @param array $miscParams
You can’t perform that action at this time.
0 commit comments