Add support for phpunit 10 (#11532)
* Use static test data providers Using non-static methods as a data providers was deprecated in phpunit 10. * Rename abstract test class Abstract test case classes with Test suffix are deprecated in PHPUnit 10. We also change the ArchiverTest file name to match the new class name (ArchiverTestCase). * https://github.com/sebastianbergmann/phpunit/issues/5132pull/11536/head
parent
e7016b00a9
commit
4b210d916e
|
@ -57,7 +57,7 @@ class HomeCommandTest extends TestCase
|
|||
$this->assertSame(trim($expected), trim($appTester->getDisplay(true)));
|
||||
}
|
||||
|
||||
public function useCaseProvider(): Generator
|
||||
public static function useCaseProvider(): Generator
|
||||
{
|
||||
yield 'Invalid or missing repository URL' => [
|
||||
[
|
||||
|
|
|
@ -129,7 +129,7 @@ class SuggestsCommandTest extends TestCase
|
|||
self::assertSame(trim($expected), trim($appTester->getDisplay(true)));
|
||||
}
|
||||
|
||||
public function provideSuggest(): \Generator
|
||||
public static function provideSuggest(): \Generator
|
||||
{
|
||||
yield 'with lockfile, show suggested' => [
|
||||
true,
|
||||
|
|
|
@ -21,7 +21,7 @@ use Composer\Test\Mock\FactoryMock;
|
|||
use Composer\Util\Platform;
|
||||
use Composer\Util\ProcessExecutor;
|
||||
|
||||
class ArchiveManagerTest extends ArchiverTest
|
||||
class ArchiveManagerTest extends ArchiverTestCase
|
||||
{
|
||||
/**
|
||||
* @var ArchiveManager
|
||||
|
|
|
@ -17,7 +17,7 @@ use Composer\Util\Filesystem;
|
|||
use Composer\Util\ProcessExecutor;
|
||||
use Composer\Package\CompletePackage;
|
||||
|
||||
abstract class ArchiverTest extends TestCase
|
||||
abstract class ArchiverTestCase extends TestCase
|
||||
{
|
||||
/**
|
||||
* @var \Composer\Util\Filesystem
|
|
@ -15,7 +15,7 @@ namespace Composer\Test\Package\Archiver;
|
|||
use Composer\Package\Archiver\PharArchiver;
|
||||
use Composer\Util\Platform;
|
||||
|
||||
class PharArchiverTest extends ArchiverTest
|
||||
class PharArchiverTest extends ArchiverTestCase
|
||||
{
|
||||
public function testTarArchive(): void
|
||||
{
|
||||
|
|
|
@ -16,7 +16,7 @@ use Composer\Util\Platform;
|
|||
use ZipArchive;
|
||||
use Composer\Package\Archiver\ZipArchiver;
|
||||
|
||||
class ZipArchiverTest extends ArchiverTest
|
||||
class ZipArchiverTest extends ArchiverTestCase
|
||||
{
|
||||
/**
|
||||
* @dataProvider provideGitignoreExcludeNegationTestCases
|
||||
|
|
Loading…
Reference in New Issue