Skip to content

Commit

Permalink
Fixed testing
Browse files Browse the repository at this point in the history
  • Loading branch information
Okipa committed Dec 3, 2020
1 parent 74a49d9 commit 305cdac
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ Will generate:

```php
// Example
['mimetypes:image/jpeg,image/png', 'mimes:jpeg,jpg,jpe,png', 'dimensions:min_width=60,min_height=20', 'max:5000'];
['mimetypes:image/jpeg,image/png', 'mimes:jpg,jpeg,jpe,png', 'dimensions:min_width=60,min_height=20', 'max:5000'];
```

#### Available methods:
Expand All @@ -143,7 +143,7 @@ Will generate:

```html
<!-- Example -->
Min. width: 150 px. Min. height: 70 px. Accepted types: jpeg, jpg, jpe, png. Max file size: 5Mb.
Min. width: 150 px. Min. height: 70 px. Accepted types: jpg, jpeg, jpe, png. Max file size: 5Mb.
```

#### Available methods:
Expand Down
6 changes: 3 additions & 3 deletions tests/Unit/Captions/CollectionCaptionsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public function registerMediaConversions(Media $media = null): void
. trans_choice(
'{1}Accepted type: :types.|[2,*]Accepted types: :types.',
2,
['types' => 'jpeg, jpg, jpe, png']
['types' => 'jpg, jpeg, jpe, png']
),
$captionString
);
Expand Down Expand Up @@ -95,7 +95,7 @@ public function registerMediaCollections(): void
'{1}Accepted type: :types.|[2,*]Accepted types: :types.',
2,
[
'types' => 'jpeg, jpg, jpe, png',
'types' => 'jpg, jpeg, jpe, png',
]
) . ' ' . __('Max. file size: :size Mb.', [
'size' => 1,
Expand Down Expand Up @@ -126,7 +126,7 @@ public function registerMediaConversions(Media $media = null): void
'{1}Accepted type: :types.|[2,*]Accepted types: :types.',
2,
[
'types' => 'jpeg, jpg, jpe, png',
'types' => 'jpg, jpeg, jpe, png',
]
) . ' ' . __('Max. file size: :size Mb.', [
'size' => 1,
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/Captions/CollectionTypesCaptionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public function registerMediaConversions(Media $media = null): void
trans_choice(
'{1}Accepted type: :types.|[2,*]Accepted types: :types.',
3,
['types' => 'jpeg, jpg, jpe, png']
['types' => 'jpg, jpeg, jpe, png']
),
$dimensionsCaptionString
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public function registerMediaConversions(Media $media = null): void
}
};
$rules = $testModel->getMediaMimesValidationRules('avatar');
self::assertEquals('mimes:jpeg,jpg,jpe,png,pdf', $rules);
self::assertEquals('mimes:jpg,jpeg,jpe,png,pdf', $rules);
}

/** @test */
Expand Down
4 changes: 2 additions & 2 deletions tests/Unit/ValidationRules/CollectionValidationRulesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public function registerMediaConversions(Media $media = null): void
}
};
$rules = $testModel->getMediaValidationRules('avatar');
self::assertEquals(['mimes:jpeg,jpg,jpe,png', 'mimetypes:image/jpeg,image/png'], $rules);
self::assertEquals(['mimes:jpg,jpeg,jpe,png', 'mimetypes:image/jpeg,image/png'], $rules);
}

/** @test */
Expand Down Expand Up @@ -101,7 +101,7 @@ public function registerMediaConversions(Media $media = null): void
};
$rules = $testModel->getMediaValidationRules('avatar');
self::assertEquals([
'mimes:jpeg,jpg,jpe,png',
'mimes:jpg,jpeg,jpe,png',
'mimetypes:image/jpeg,image/png',
'dimensions:min_width=60,min_height=20',
'max:10240',
Expand Down

0 comments on commit 305cdac

Please sign in to comment.