Remove unused functions

This commit is contained in:
Pierre Rudloff 2016-04-10 23:57:19 +02:00
parent ed7018c957
commit c6c2214567
2 changed files with 1 additions and 68 deletions

View file

@ -40,23 +40,6 @@ class VideoDownload
);
}
/**
* Get the user agent used youtube-dl
*
* @return string UA
* */
public function getUA()
{
$this->procBuilder->setArguments(
array(
'--dump-user-agent'
)
);
$process = $this->procBuilder->getProcess();
$process->run();
return trim($process->getOutput());
}
/**
* List all extractors
*
@ -74,30 +57,6 @@ class VideoDownload
return explode(PHP_EOL, $process->getOutput());
}
/**
* Get filename of video
*
* @param string $url URL of page
* @param string $format Format to use for the video
*
* @return string Filename
* */
public function getFilename($url, $format = null)
{
$this->procBuilder->setArguments(
array(
'--get-filename',
$url
)
);
if (isset($format)) {
$this->procBuilder->add('-f '.$format);
}
$process = $this->procBuilder->getProcess();
$process->run();
return trim($process->getOutput());
}
/**
* Get all information about a video
*

View file

@ -33,17 +33,7 @@ class VideoDownloadTest extends \PHPUnit_Framework_TestCase
}
/**
* Test getUA function
*
* @return void
*/
public function testGetUA()
{
$this->assertStringStartsWith('Mozilla/', $this->download->getUA());
}
/**
* Test listExtractors funtion
* Test listExtractors function
*
* @return void
*/
@ -121,22 +111,6 @@ class VideoDownloadTest extends \PHPUnit_Framework_TestCase
);
}
/**
* Test getFilename function
*
* @param string $url URL
* @param string $format Format
* @param string $result Expected filename
*
* @return void
* @dataProvider URLProvider
*/
public function testGetFilename($url, $format, $result)
{
$filename = $this->download->getFilename($url, $format);
$this->assertEquals($filename, $result);
}
/**
* Test getJSON function
*