@@ -184,45 +184,4 @@ public function it_returns_browser_path_when_hostname_is_empty(): void
184184
185185 $ this ->assertEquals ($ browserPath , $ result );
186186 }
187-
188- /**
189- * @test
190- */
191- public function it_returns_absolute_url_when_hostname_is_available (): void
192- {
193- $ path = 'path/to/image.jpg ' ;
194- $ hostname = 'example.com ' ;
195- $ absolutePath = '/media/cache/resolve/sylius_shop_product_large_thumbnail/path/to/image.jpg ' ;
196- $ expectedUrl = 'https://example.com/media/cache/resolve/sylius_shop_product_large_thumbnail/path/to/image.jpg ' ;
197-
198- // Use Prophecy's argument matchers to match any call to getBrowserPath
199- $ this ->cacheManager ->getBrowserPath (
200- \Prophecy \Argument::cetera (),
201- )->willReturn ($ absolutePath );
202-
203- $ resolver = new ImageUrlResolver ($ this ->cacheManager ->reveal (), $ this ->filter );
204-
205- $ image = $ this ->prophesize (ImageInterface::class);
206- $ image ->getPath ()->willReturn ($ path );
207-
208- $ images = $ this ->prophesize (Collection::class);
209- $ images ->first ()->willReturn ($ image ->reveal ());
210-
211- $ product = $ this ->prophesize (ProductInterface::class);
212- $ product ->getImages ()->willReturn ($ images ->reveal ());
213-
214- $ productVariant = $ this ->prophesize (ProductVariantInterface::class);
215- $ productVariant ->getProduct ()->willReturn ($ product ->reveal ());
216-
217- $ channel = $ this ->prophesize (ChannelInterface::class);
218- $ channel ->getHostname ()->willReturn ($ hostname );
219-
220- $ request = $ this ->prophesize (RestockNotificationRequestInterface::class);
221- $ request ->getProductVariant ()->willReturn ($ productVariant ->reveal ());
222- $ request ->getChannel ()->willReturn ($ channel ->reveal ());
223-
224- $ result = $ resolver ->resolve ($ request ->reveal ());
225-
226- $ this ->assertEquals ($ expectedUrl , $ result );
227- }
228187}
0 commit comments