This commit is contained in:
Pierre Rudloff 2015-10-29 18:40:22 +01:00
parent 7f6736d0cb
commit 347ec92f35

View file

@ -29,6 +29,7 @@ class VideoDownloadTest extends PHPUnit_Framework_TestCase
{ {
/** /**
* Test getUA function * Test getUA function
*
* @return void * @return void
*/ */
public function testGetUA() public function testGetUA()
@ -38,6 +39,7 @@ class VideoDownloadTest extends PHPUnit_Framework_TestCase
/** /**
* Test listExtractors funtion * Test listExtractors funtion
*
* @return void * @return void
*/ */
public function testListExtractors() public function testListExtractors()
@ -48,10 +50,12 @@ class VideoDownloadTest extends PHPUnit_Framework_TestCase
/** /**
* Test getURL function * Test getURL function
*
* @param string $url URL * @param string $url URL
* @param string $format Format * @param string $format Format
*
* @return void * @return void
* @dataProvider URLProvider * @dataProvider urlProvider
*/ */
public function testGetURL($url, $format) public function testGetURL($url, $format)
{ {
@ -62,10 +66,12 @@ class VideoDownloadTest extends PHPUnit_Framework_TestCase
/** /**
* Test getURL function errors * Test getURL function errors
*
* @param string $url URL * @param string $url URL
*
* @return void * @return void
* @expectedException Exception * @expectedException Exception
* @dataProvider ErrorURLProvider * @dataProvider ErrorUrlProvider
*/ */
public function testGetURLError($url) public function testGetURLError($url)
{ {
@ -74,9 +80,10 @@ class VideoDownloadTest extends PHPUnit_Framework_TestCase
/** /**
* Provides URLs for tests * Provides URLs for tests
*
* @return void * @return void
*/ */
public function URLProvider() public function urlProvider()
{ {
return array( return array(
array( array(
@ -97,9 +104,10 @@ class VideoDownloadTest extends PHPUnit_Framework_TestCase
/** /**
* Provides incorrect URLs for tests * Provides incorrect URLs for tests
*
* @return void * @return void
*/ */
public function errorURLProvider() public function errorUrlProvider()
{ {
return array( return array(
array('http://example.com/video') array('http://example.com/video')
@ -108,9 +116,11 @@ class VideoDownloadTest extends PHPUnit_Framework_TestCase
/** /**
* Test getFilename function * Test getFilename function
*
* @param string $url URL * @param string $url URL
* @param string $format Format * @param string $format Format
* @param string $result Expected filename * @param string $result Expected filename
*
* @return void * @return void
* @dataProvider URLProvider * @dataProvider URLProvider
*/ */
@ -122,8 +132,10 @@ class VideoDownloadTest extends PHPUnit_Framework_TestCase
/** /**
* Test getJSON function * Test getJSON function
*
* @param string $url URL * @param string $url URL
* @param string $format Format * @param string $format Format
*
* @return void * @return void
* @dataProvider URLProvider * @dataProvider URLProvider
*/ */
@ -140,7 +152,9 @@ class VideoDownloadTest extends PHPUnit_Framework_TestCase
/** /**
* Test getJSON function errors * Test getJSON function errors
*
* @param string $url URL * @param string $url URL
*
* @return void * @return void
* @expectedException Exception * @expectedException Exception
* @dataProvider ErrorURLProvider * @dataProvider ErrorURLProvider