Add a rotate filter (fix #15)
This commit is contained in:
parent
8fd4e23615
commit
6948e263ff
4 changed files with 111 additions and 0 deletions
27
tests/FFMpeg/Tests/Filters/Video/RotateFilterTest.php
Normal file
27
tests/FFMpeg/Tests/Filters/Video/RotateFilterTest.php
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
<?php
|
||||
|
||||
namespace FFMpeg\Tests\Filters\Video;
|
||||
|
||||
use FFMpeg\Filters\Video\RotateFilter;
|
||||
use FFMpeg\Tests\TestCase;
|
||||
|
||||
class RotateFilterTest extends TestCase
|
||||
{
|
||||
public function testApply()
|
||||
{
|
||||
$video = $this->getVideoMock();
|
||||
$format = $this->getMock('FFMpeg\Format\VideoInterface');
|
||||
|
||||
$filter = new RotateFilter(RotateFilter::ROTATE_90);
|
||||
$this->assertEquals(array('-vf', RotateFilter::ROTATE_90, '-metadata:s:v:0', 'rotate=0'), $filter->apply($video, $format));
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException \FFMpeg\Exception\InvalidArgumentException
|
||||
* @expectedExceptionMessage Invalid angle value.
|
||||
*/
|
||||
public function testApplyInvalidAngle()
|
||||
{
|
||||
new RotateFilter('90');
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue