1
0
Fork 0
mirror of https://github.com/composer/composer synced 2025-05-09 00:22:53 +00:00

Update PHPUnit to 8.5

This commit is contained in:
Jordi Boggiano 2021-12-08 17:03:05 +01:00
parent d2ede370be
commit 2a771dfb2d
No known key found for this signature in database
GPG key ID: 7BBD42C429EC80BC
58 changed files with 1385 additions and 749 deletions

View file

@ -19,7 +19,7 @@ use Composer\Package\BasePackage;
class ArtifactRepositoryTest extends TestCase
{
public function setUp()
public function setUp(): void
{
parent::setUp();
if (!extension_loaded('zip')) {

View file

@ -25,7 +25,7 @@ class FilterRepositoryTest extends TestCase
*/
private $arrayRepo;
public function setUp()
public function setUp(): void
{
$this->arrayRepo = new ArrayRepository();
$this->arrayRepo->addPackage($this->getPackage('foo/aaa', '1.0.0'));

View file

@ -21,12 +21,12 @@ class RepositoryManagerTest extends TestCase
/** @var string */
protected $tmpdir;
public function setUp()
public function setUp(): void
{
$this->tmpdir = $this->getUniqueTmpDirectory();
}
public function tearDown()
public function tearDown(): void
{
if (is_dir($this->tmpdir)) {
$fs = new Filesystem();

View file

@ -28,7 +28,7 @@ class FossilDriverTest extends TestCase
*/
protected $config;
public function setUp()
public function setUp(): void
{
$this->home = $this->getUniqueTmpDirectory();
$this->config = new Config();
@ -39,7 +39,7 @@ class FossilDriverTest extends TestCase
));
}
public function tearDown()
public function tearDown(): void
{
$fs = new Filesystem();
$fs->removeDirectory($this->home);

View file

@ -33,7 +33,7 @@ class GitBitbucketDriverTest extends TestCase
/** @var string */
private $home;
protected function setUp()
protected function setUp(): void
{
$this->io = $this->getMockBuilder('Composer\IO\IOInterface')->getMock();
@ -51,7 +51,7 @@ class GitBitbucketDriverTest extends TestCase
->getMock();
}
public function tearDown()
public function tearDown(): void
{
$fs = new Filesystem;
$fs->removeDirectory($this->home);

View file

@ -28,7 +28,7 @@ class GitHubDriverTest extends TestCase
/** @var Config */
private $config;
public function setUp()
public function setUp(): void
{
$this->home = $this->getUniqueTmpDirectory();
$this->config = new Config();
@ -39,7 +39,7 @@ class GitHubDriverTest extends TestCase
));
}
public function tearDown()
public function tearDown(): void
{
$fs = new Filesystem;
$fs->removeDirectory($this->home);

View file

@ -45,7 +45,7 @@ class GitLabDriverTest extends TestCase
*/
private $httpDownloader;
public function setUp()
public function setUp(): void
{
$this->home = $this->getUniqueTmpDirectory();
$this->config = new Config();
@ -66,7 +66,7 @@ class GitLabDriverTest extends TestCase
$this->httpDownloader = $this->prophesize('Composer\Util\HttpDownloader');
}
public function tearDown()
public function tearDown(): void
{
$fs = new Filesystem();
$fs->removeDirectory($this->home);

View file

@ -26,7 +26,7 @@ class HgDriverTest extends TestCase
/** @var string */
private $home;
public function setUp()
public function setUp(): void
{
$this->io = $this->getMockBuilder('Composer\IO\IOInterface')->getMock();
$this->home = $this->getUniqueTmpDirectory();
@ -38,7 +38,7 @@ class HgDriverTest extends TestCase
));
}
public function tearDown()
public function tearDown(): void
{
$fs = new Filesystem;
$fs->removeDirectory($this->home);

View file

@ -61,7 +61,7 @@ class PerforceDriverTest extends TestCase
const TEST_DEPOT = 'TEST_DEPOT_CONFIG';
const TEST_BRANCH = 'TEST_BRANCH_CONFIG';
protected function setUp()
protected function setUp(): void
{
$this->testPath = $this->getUniqueTmpDirectory();
$this->config = $this->getTestConfig($this->testPath);
@ -78,7 +78,7 @@ class PerforceDriverTest extends TestCase
$this->overrideDriverInternalPerforce($this->perforce);
}
protected function tearDown()
protected function tearDown(): void
{
//cleanup directory under test path
$fs = new Filesystem;

View file

@ -29,7 +29,7 @@ class SvnDriverTest extends TestCase
*/
protected $config;
public function setUp()
public function setUp(): void
{
$this->home = $this->getUniqueTmpDirectory();
$this->config = new Config();
@ -40,7 +40,7 @@ class SvnDriverTest extends TestCase
));
}
public function tearDown()
public function tearDown(): void
{
$fs = new Filesystem();
$fs->removeDirectory($this->home);

View file

@ -130,7 +130,7 @@ class VcsRepositoryTest extends TestCase
chdir($oldCwd);
}
public function setUp()
public function setUp(): void
{
if (!self::$gitRepo) {
$this->initialize();
@ -140,7 +140,7 @@ class VcsRepositoryTest extends TestCase
}
}
public static function tearDownAfterClass()
public static function tearDownAfterClass(): void
{
$fs = new Filesystem;
$fs->removeDirectory(self::$composerHome);