From 43adde0a3515cb88ccad19867032196b0fb864f5 Mon Sep 17 00:00:00 2001 From: Massimiliano Arione Date: Sun, 28 Apr 2019 19:10:20 +0200 Subject: [PATCH] revert 514425c3115024cd680ee02113918b56cb639ad9 See issue #858 --- Form/Type/VichImageType.php | 2 +- Tests/Form/Type/VichImageTypeTest.php | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Form/Type/VichImageType.php b/Form/Type/VichImageType.php index bd49985f..1a0a6ee7 100644 --- a/Form/Type/VichImageType.php +++ b/Form/Type/VichImageType.php @@ -66,7 +66,7 @@ public function buildView(FormView $view, FormInterface $form, array $options): throw new \RuntimeException('LiipImagineBundle must be installed and configured for using "imagine_pattern" option.'); } - $path = $this->storage->resolvePath($object, $form->getName(), null, true); + $path = $this->storage->resolveUri($object, $form->getName(), null); if (null !== $path) { $view->vars['image_uri'] = $this->cacheManager->getBrowserPath($path, $options['imagine_pattern']); } diff --git a/Tests/Form/Type/VichImageTypeTest.php b/Tests/Form/Type/VichImageTypeTest.php index 5f237519..7fb84120 100644 --- a/Tests/Form/Type/VichImageTypeTest.php +++ b/Tests/Form/Type/VichImageTypeTest.php @@ -146,9 +146,9 @@ public function testLiipImagineBundleIntegration(): void $storage = $this->createMock(StorageInterface::class); $storage ->expects($this->any()) - ->method('resolvePath') - ->with($object, $field, null, true) - ->will($this->returnValue('resolved-path')); + ->method('resolveUri') + ->with($object, $field) + ->will($this->returnValue('resolved-uri')); $parentForm = $this->createMock(FormInterface::class); $parentForm @@ -175,7 +175,7 @@ public function testLiipImagineBundleIntegration(): void $cacheManager ->expects($this->once()) ->method('getBrowserPath') - ->with('resolved-path', 'product_sq200') + ->with('resolved-uri', 'product_sq200') ->will($this->returnValue('product_sq200/resolved-uri')); $testedType = static::TESTED_TYPE;