-
-
Notifications
You must be signed in to change notification settings - Fork 195
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
317a047
commit 6bdeb5c
Showing
3 changed files
with
23 additions
and
1 deletion.
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,18 @@ | ||
<?php | ||
|
||
namespace ProtoneMedia\LaravelFFMpeg\Tests; | ||
|
||
use FFMpeg\FFProbe\DataMapping\Stream; | ||
use ProtoneMedia\LaravelFFMpeg\Support\StreamParser; | ||
|
||
class StreamParserTest extends TestCase | ||
{ | ||
/** @test */ | ||
public function it_can_extract_the_average_frame_rate() | ||
{ | ||
$this->assertEquals(25, StreamParser::new(new Stream(['avg_frame_rate' => 25]))->getFrameRate()); | ||
$this->assertEquals(25, StreamParser::new(new Stream(['avg_frame_rate' => '25/1']))->getFrameRate()); | ||
$this->assertEquals(25, StreamParser::new(new Stream(['avg_frame_rate' => '250/10']))->getFrameRate()); | ||
$this->assertEquals(25, StreamParser::new(new Stream(['avg_frame_rate' => '50/2']))->getFrameRate()); | ||
} | ||
} |