@@ -205,13 +205,26 @@ public function testGetCachePathWithExtensionAndFmParam()
205
205
$ this ->assertEquals ('image.jpg/eb6091e07fb06219634a3c82afb88239.gif ' , $ this ->server ->getCachePath ('image.jpg ' , ['fm ' => 'gif ' ]));
206
206
}
207
207
208
+ public function testGetCachePathWithExtensionAndPjpgFmParam ()
209
+ {
210
+ $ this ->server ->setCacheWithFileExtensions (true );
211
+ $ this ->assertEquals ('image.jpg/ce5cb75f4a37dec0a0a49854e94123eb.jpg ' , $ this ->server ->getCachePath ('image.jpg ' , ['fm ' => 'pjpg ' ]));
212
+ }
213
+
208
214
public function testGetCachePathWithExtensionAndFmFromDefaults ()
209
215
{
210
216
$ this ->server ->setCacheWithFileExtensions (true );
211
217
$ this ->server ->setDefaults (['fm ' => 'gif ' ]);
212
218
$ this ->assertEquals ('image.jpg/eb6091e07fb06219634a3c82afb88239.gif ' , $ this ->server ->getCachePath ('image.jpg ' , []));
213
219
}
214
220
221
+ public function testGetCachePathWithExtensionAndPjpgFmFromDefaults ()
222
+ {
223
+ $ this ->server ->setCacheWithFileExtensions (true );
224
+ $ this ->server ->setDefaults (['fm ' => 'pjpg ' ]);
225
+ $ this ->assertEquals ('image.jpg/ce5cb75f4a37dec0a0a49854e94123eb.jpg ' , $ this ->server ->getCachePath ('image.jpg ' , []));
226
+ }
227
+
215
228
public function testGetCachePathWithExtensionAndFmFromPreset ()
216
229
{
217
230
$ this ->server ->setCacheWithFileExtensions (true );
@@ -223,6 +236,17 @@ public function testGetCachePathWithExtensionAndFmFromPreset()
223
236
$ this ->assertEquals ('image.jpg/eb6091e07fb06219634a3c82afb88239.gif ' , $ this ->server ->getCachePath ('image.jpg ' , ['p ' => 'gif ' ]));
224
237
}
225
238
239
+ public function testGetCachePathWithExtensionAndPjpgFmFromPreset ()
240
+ {
241
+ $ this ->server ->setCacheWithFileExtensions (true );
242
+
243
+ $ this ->server ->setPresets (['pjpg ' => [
244
+ 'fm ' => 'pjpg ' ,
245
+ ]]);
246
+
247
+ $ this ->assertEquals ('image.jpg/ce5cb75f4a37dec0a0a49854e94123eb.jpg ' , $ this ->server ->getCachePath ('image.jpg ' , ['p ' => 'pjpg ' ]));
248
+ }
249
+
226
250
public function testCacheFileExists ()
227
251
{
228
252
$ this ->server ->setCache (Mockery::mock ('League\Flysystem\FilesystemInterface ' , function ($ mock ) {
0 commit comments