Add timeout getter and setter
This commit is contained in:
parent
0567c42f07
commit
94c13056e4
2 changed files with 63 additions and 0 deletions
|
|
@ -29,6 +29,40 @@ class BinaryTest extends \PHPUnit_Framework_TestCase
|
|||
$binary = new BinaryTester('pretty_binary', $this->logger);
|
||||
}
|
||||
|
||||
public function testTimeout()
|
||||
{
|
||||
$tester = BinaryTester::load($this->logger, 200);
|
||||
$this->assertEquals(200, $tester->getTimeout());
|
||||
}
|
||||
|
||||
public function testDefaultTimeout()
|
||||
{
|
||||
$tester = BinaryTester::load($this->logger);
|
||||
$this->assertEquals(60, $tester->getTimeout());
|
||||
}
|
||||
|
||||
public function testNoTimeout()
|
||||
{
|
||||
$tester = BinaryTester::load($this->logger, 0);
|
||||
$this->assertEquals(0, $tester->getTimeout());
|
||||
}
|
||||
|
||||
public function testSetTimeout()
|
||||
{
|
||||
$tester = BinaryTester::load($this->logger);
|
||||
$tester->setTimeout(200);
|
||||
$this->assertEquals(200, $tester->getTimeout());
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException \FFMpeg\Exception\InvalidArgumentException
|
||||
*/
|
||||
public function testSetInvalidTimeout()
|
||||
{
|
||||
$tester = BinaryTester::load($this->logger);
|
||||
$tester->setTimeout(-1);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FFMpeg\Binary::load
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue