Upgrade phpunit to 9.5

So we stop depending on the unmaintained php-token-stream
This commit is contained in:
Pierre Rudloff 2021-10-17 21:01:55 +02:00
parent 60f924f4bf
commit 55db198d39
6 changed files with 919 additions and 476 deletions

View file

@ -50,7 +50,7 @@
"php-mock/php-mock-mockery": "^1.3", "php-mock/php-mock-mockery": "^1.3",
"phpro/grumphp": "^1.3", "phpro/grumphp": "^1.3",
"phpstan/phpstan": "^0.12.72", "phpstan/phpstan": "^0.12.72",
"phpunit/phpunit": "^8.4", "phpunit/phpunit": "^9.5",
"smarty-gettext/smarty-gettext": "^1.6", "smarty-gettext/smarty-gettext": "^1.6",
"squizlabs/php_codesniffer": "^3.5", "squizlabs/php_codesniffer": "^3.5",
"symfony/error-handler": "^5.0", "symfony/error-handler": "^5.0",

1363
composer.lock generated

File diff suppressed because it is too large Load diff

View file

@ -1,10 +1,11 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<phpunit bootstrap="tests/bootstrap.php"> <phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" bootstrap="tests/bootstrap.php"
<filter> xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
<whitelist> <coverage>
<include>
<directory>classes/</directory> <directory>classes/</directory>
</whitelist> </include>
</filter> </coverage>
<testsuites> <testsuites>
<testsuite name="Tests"> <testsuite name="Tests">
<directory>tests/</directory> <directory>tests/</directory>

View file

@ -7,6 +7,7 @@
namespace Alltube\Test; namespace Alltube\Test;
use PHPUnit\Framework\TestCase; use PHPUnit\Framework\TestCase;
use PHPUnit\Util\Test;
/** /**
* Abstract class used by every test. * Abstract class used by every test.
@ -37,7 +38,10 @@ abstract class BaseTest extends TestCase
*/ */
protected function checkRequirements() protected function checkRequirements()
{ {
$annotations = $this->getAnnotations(); $annotations = Test::parseTestMethodAnnotations(
static::class,
$this->getName()
);
$requires = []; $requires = [];
if (isset($annotations['class']['requires'])) { if (isset($annotations['class']['requires'])) {

View file

@ -108,14 +108,6 @@ class DownloadControllerTest extends ControllerTest
public function testDownloadWithRtmpStream() public function testDownloadWithRtmpStream()
{ {
$this->markTestIncomplete('We need to find another RTMP video.'); $this->markTestIncomplete('We need to find another RTMP video.');
$config = $this->container->get('config');
$config->setOptions(['stream' => true]);
$this->assertRequestIsOk(
'download',
['url' => 'http://www.rtvnh.nl/video/131946', 'format' => 'rtmp-264']
);
} }
/** /**

View file

@ -479,16 +479,11 @@ class VideoTest extends ContainerTest
* @param string $format Format * @param string $format Format
* *
* @return void * @return void
* @throws AlltubeLibraryException
* @dataProvider rtmpUrlProvider * @dataProvider rtmpUrlProvider
*/ */
public function testGetRtmpStream(string $url, string $format) public function testGetRtmpStream(string $url, string $format)
{ {
$this->markTestIncomplete('We need to find another RTMP video.'); $this->markTestIncomplete('We need to find another RTMP video.');
$video = new Video($this->downloader, $url, $format);
$this->assertStream($this->downloader->getRtmpStream($video));
} }
/** /**