From eec7e3f2dd639f0f2b3dd2adb5fea9898ff9894a Mon Sep 17 00:00:00 2001 From: Romain Neutron Date: Fri, 13 Apr 2012 11:35:55 +0200 Subject: [PATCH] Add Formats tests --- tests/src/FFMpeg/Format/OggTest.php | 41 +++++++++++++++++++++++ tests/src/FFMpeg/Format/WebMTest.php | 49 ++++++++++++++++++++++++++++ tests/src/FFMpeg/Format/X264Test.php | 42 ++++++++++++++++++++++++ 3 files changed, 132 insertions(+) create mode 100644 tests/src/FFMpeg/Format/OggTest.php create mode 100644 tests/src/FFMpeg/Format/WebMTest.php create mode 100644 tests/src/FFMpeg/Format/X264Test.php diff --git a/tests/src/FFMpeg/Format/OggTest.php b/tests/src/FFMpeg/Format/OggTest.php new file mode 100644 index 0000000..77ee711 --- /dev/null +++ b/tests/src/FFMpeg/Format/OggTest.php @@ -0,0 +1,41 @@ +object = new Ogg(320, 320); + } + + public function testConstruct() + { + $this->assertInstanceOf('\\FFMpeg\\Format\\DefaultFormat', $this->object); + } + + /** + * @covers FFMpeg\Format\Ogg::getAvailableAudioCodecs + */ + public function testGetAvailableAudioCodecs() + { + $this->object->setAudioCodec('libvorbis'); + } + + /** + * @covers FFMpeg\Format\Ogg::getAvailableVideoCodecs + */ + public function testGetAvailableVideoCodecs() + { + $this->object->setVideoCodec('libtheora'); + } + +} diff --git a/tests/src/FFMpeg/Format/WebMTest.php b/tests/src/FFMpeg/Format/WebMTest.php new file mode 100644 index 0000000..8a7571a --- /dev/null +++ b/tests/src/FFMpeg/Format/WebMTest.php @@ -0,0 +1,49 @@ +object = new WebM(320, 320); + } + + /** + * @covers FFMpeg\Format\WebM::getAvailableAudioCodecs + */ + public function testGetAvailableAudioCodecs() + { + $this->object->setAudioCodec('libvorbis'); + } + + /** + * @covers FFMpeg\Format\WebM::getAvailableVideoCodecs + */ + public function testGetAvailableVideoCodecs() + { + $this->object->setVideoCodec('libvpx'); + } + + /** + * @covers FFMpeg\Format\WebM::getExtraParams + */ + public function testGetExtraParams() + { + $this->assertTrue(is_scalar($this->object->getExtraParams())); + } + + public function testConstruct() + { + $this->assertInstanceOf('\\FFMpeg\\Format\\DefaultFormat', $this->object); + } + +} diff --git a/tests/src/FFMpeg/Format/X264Test.php b/tests/src/FFMpeg/Format/X264Test.php new file mode 100644 index 0000000..2521002 --- /dev/null +++ b/tests/src/FFMpeg/Format/X264Test.php @@ -0,0 +1,42 @@ +object = new X264(320, 320); + } + + public function testConstruct() + { + $this->assertInstanceOf('\\FFMpeg\\Format\\DefaultFormat', $this->object); + } + + /** + * @covers FFMpeg\Format\X264::getAvailableAudioCodecs + */ + public function testGetAvailableAudioCodecs() + { + $this->object->setAudioCodec('libmp3lame'); + } + + /** + * @covers FFMpeg\Format\X264::getAvailableVideoCodecs + */ + public function testGetAvailableVideoCodecs() + { + $this->object->setVideoCodec('libx264'); + } + + +}