Skip to content

Commit

Permalink
revert 514425c
Browse files Browse the repository at this point in the history
See issue dustin10#858
  • Loading branch information
garak committed Apr 28, 2019
1 parent b9e229a commit 43adde0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Form/Type/VichImageType.php
Original file line number Diff line number Diff line change
Expand Up @@ -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']);
}
Expand Down
8 changes: 4 additions & 4 deletions Tests/Form/Type/VichImageTypeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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;
Expand Down

0 comments on commit 43adde0

Please sign in to comment.