generated from spatie/package-skeleton-laravel
- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
151cc7b
commit 07ad5f1
Showing
4 changed files
with
42 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?php | ||
|
||
use Finller\Media\Helpers\File; | ||
use Finller\Media\Helpers\Video; | ||
use Illuminate\Http\UploadedFile; | ||
|
||
it('get the correct dimention from a non rotated video', function () { | ||
|
||
$file = $this->getTestFile('videos/horizontal.mp4'); | ||
|
||
$dimension = Video::dimension($file); | ||
|
||
expect($dimension->getHeight())->toBe(720); | ||
expect($dimension->getWidth())->toBe(1280); | ||
}); | ||
|
||
it('get the correct dimention from a rotated video', function () { | ||
|
||
$file = $this->getTestFile('videos/90rotation.mp4'); | ||
|
||
$dimension = Video::dimension($file); | ||
|
||
expect($dimension->getHeight())->toBe(1920); | ||
expect($dimension->getWidth())->toBe(1080); | ||
}); |
Binary file not shown.