1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2026-01-03 23:42:28 +03:00

Updated existing image tests to reflect changes

- Also added some new tests
This commit is contained in:
Dan Brown
2019-05-04 18:11:00 +01:00
parent 79f6dc00a3
commit 8c190324ac
7 changed files with 146 additions and 92 deletions

View File

@@ -235,7 +235,7 @@ class ImageService extends UploadService
* @return string
* @throws ImageUploadException
*/
protected function resizeImage(string $imageData, $width = 220, $height = null, $keepRatio = true)
protected function resizeImage(string $imageData, $width = 220, $height = null, bool $keepRatio = true)
{
try {
$thumb = $this->imageTool->make($imageData);
@@ -336,6 +336,7 @@ class ImageService extends UploadService
$image = $this->saveNewFromUrl($userAvatarUrl, 'user', $imageName);
$image->created_by = $user->id;
$image->updated_by = $user->id;
$image->uploaded_to = $user->id;
$image->save();
return $image;