ffmpeg-mappable-media/tests/FFMpeg/Unit/Coordinate/FrameRateTest.php
Pascal Baljet 111c153428
[BC] Upgraded dependencies, dropped support for anything below PHP 8.0. (#849)
* GitHub actions + style fixes + updated packages

* Fixed workflows dir

* Support for PHP 8.1 (#1)

* Update README.md

* Revert some changes from upstream
2022-02-09 14:32:43 +01:00

31 lines
643 B
PHP

<?php
namespace Tests\FFMpeg\Unit\Coordinate;
use FFMpeg\Coordinate\FrameRate;
use Tests\FFMpeg\Unit\TestCase;
class FrameRateTest extends TestCase
{
public function testGetter()
{
$fr = new FrameRate(23.997);
$this->assertEquals(23.997, $fr->getValue());
}
/**
* @dataProvider provideInvalidFrameRates
*/
public function testInvalidFrameRate($value)
{
$this->expectException('\FFMpeg\Exception\InvalidArgumentException');
new FrameRate($value);
}
public function provideInvalidFrameRates()
{
return [
[0], [-1.5], [-2],
];
}
}