Added configuration for audio channels

This commit is contained in:
Simon Schick 2014-06-25 09:55:00 +02:00
commit 7004e53399
8 changed files with 130 additions and 17 deletions

View file

@ -71,6 +71,34 @@ abstract class AudioTestCase extends TestCase
$this->getFormat()->setAudioKiloBitrate(-10);
}
public function testGetAudioChannels()
{
$this->assertInternalType('null', $this->getFormat()->getAudioChannels());
}
public function testSetAudioChannels()
{
$format = $this->getFormat();
$format->setAudioChannels(2);
$this->assertEquals(2, $format->getAudioChannels());
}
/**
* @expectedException FFMpeg\Exception\InvalidArgumentException
*/
public function testSetInvalidChannels()
{
$this->getFormat()->setAudioChannels(0);
}
/**
* @expectedException FFMpeg\Exception\InvalidArgumentException
*/
public function testSetNegativeChannels()
{
$this->getFormat()->setAudioChannels(-10);
}
public function testCreateProgressListener()
{
$media = $this->getMock('FFMpeg\Media\MediaTypeInterface');