Skip to content

Commit

Permalink
Merge pull request #113 from netgen/cloudinary-callback-notification-…
Browse files Browse the repository at this point in the history
…system-issue-fix

Revert changes in AbstractController, adjust tests
  • Loading branch information
RandyCupic authored Sep 19, 2024
2 parents 21a41df + 2d060bd commit 19b2964
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions bundle/Controller/Resource/AbstractController.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ protected function formatResource(RemoteResource $resource): array
'size' => $resource->getSize(),
'width' => $resource->getMetadataProperty('width'),
'height' => $resource->getMetadataProperty('height'),
'filename' => (string) $resource->getName(),
'originalFilename' => (string) $resource->getOriginalFilename(),
'filename' => $resource->getName(),
'originalFilename' => $resource->getOriginalFilename(),
'format' => $resource->getMetadataProperty('format'),
'browseUrl' => $this->resolveImageUrl($resource, 'browse'),
'previewUrl' => $this->resolveImageUrl($resource, 'preview'),
Expand Down
6 changes: 3 additions & 3 deletions tests/bundle/Controller/Resource/BrowseTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ public function test(): void
'width' => null,
'height' => null,
'filename' => 'image.jpg',
'originalFilename' => '',
'originalFilename' => null,
'format' => null,
'browseUrl' => 'https://cloudinary.com/test/c_fit_160_120/upload/images/image.jpg',
'previewUrl' => 'https://cloudinary.com/test/c_fit_800_600/upload/images/image.jpg',
Expand All @@ -194,7 +194,7 @@ public function test(): void
'width' => null,
'height' => null,
'filename' => 'image2.jpg',
'originalFilename' => '',
'originalFilename' => null,
'format' => null,
'browseUrl' => 'https://cloudinary.com/test/c_fit_160_120/upload/images/image2.jpg',
'previewUrl' => 'https://cloudinary.com/test/c_fit_800_600/upload/images/image2.jpg',
Expand All @@ -212,7 +212,7 @@ public function test(): void
'width' => null,
'height' => null,
'filename' => 'example.mp4',
'originalFilename' => '',
'originalFilename' => null,
'format' => null,
'browseUrl' => 'https://cloudinary.com/test/c_fit_160_120/upload/videos/example.mp4.jpg',
'previewUrl' => 'https://cloudinary.com/test/c_fit_800_600/upload/videos/example.mp4.jpg',
Expand Down
8 changes: 4 additions & 4 deletions tests/bundle/Controller/Resource/UploadTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ public function testUpload(): void
'width' => null,
'height' => null,
'filename' => 'sample_image.jpg',
'originalFilename' => '',
'originalFilename' => null,
'format' => null,
'browseUrl' => 'https://cloudinary.com/test/c_fit_160_120/upload/image/media/image/sample_image.jpg',
'previewUrl' => 'https://cloudinary.com/test/c_fit_800_600/upload/image/media/image/sample_image.jpg',
Expand Down Expand Up @@ -305,7 +305,7 @@ public function testUploadProtectedWithContext(): void
'width' => null,
'height' => null,
'filename' => 'sample_image.jpg',
'originalFilename' => '',
'originalFilename' => null,
'format' => null,
'browseUrl' => 'https://cloudinary.com/test/c_fit_160_120/authenticated/image/media/image/sample_image.jpg',
'previewUrl' => 'https://cloudinary.com/test/c_fit_800_600/authenticated/image/media/image/sample_image.jpg',
Expand Down Expand Up @@ -470,7 +470,7 @@ public function testUploadExistingFile(): void
'width' => null,
'height' => null,
'filename' => 'sample_image.jpg',
'originalFilename' => '',
'originalFilename' => null,
'format' => null,
'browseUrl' => 'https://cloudinary.com/test/c_fit_160_120/upload/image/sample_image.jpg',
'previewUrl' => 'https://cloudinary.com/test/c_fit_800_600/upload/image/sample_image.jpg',
Expand Down Expand Up @@ -631,7 +631,7 @@ public function testUploadExistingFileName(): void
'width' => null,
'height' => null,
'filename' => 'sample_image.jpg',
'originalFilename' => '',
'originalFilename' => null,
'format' => null,
'browseUrl' => 'https://cloudinary.com/test/c_fit_160_120/upload/image/media/image/sample_image.jpg',
'previewUrl' => 'https://cloudinary.com/test/c_fit_800_600/upload/image/media/image/sample_image.jpg',
Expand Down

0 comments on commit 19b2964

Please sign in to comment.