From: =?utf-8?q?David_Pr=C3=A9vot?= <taffit@debian.org>
Date: Sat, 3 Aug 2019 04:06:02 -0400
Subject: Compatibility with recent PHPUnit (8)

---
 tests/Composer/Test/AllFunctionalTest.php                         | 8 ++++----
 tests/Composer/Test/Autoload/AutoloadGeneratorTest.php            | 4 ++--
 tests/Composer/Test/CacheTest.php                                 | 4 ++--
 tests/Composer/Test/Config/JsonConfigSourceTest.php               | 4 ++--
 tests/Composer/Test/DependencyResolver/DefaultPolicyTest.php      | 2 +-
 tests/Composer/Test/DependencyResolver/RuleSetIteratorTest.php    | 2 +-
 tests/Composer/Test/DependencyResolver/SolverTest.php             | 2 +-
 tests/Composer/Test/DependencyResolver/TransactionTest.php        | 2 +-
 tests/Composer/Test/Downloader/DownloadManagerTest.php            | 2 +-
 tests/Composer/Test/Downloader/FossilDownloaderTest.php           | 4 ++--
 tests/Composer/Test/Downloader/GitDownloaderTest.php              | 4 ++--
 tests/Composer/Test/Downloader/HgDownloaderTest.php               | 4 ++--
 tests/Composer/Test/Downloader/PerforceDownloaderTest.php         | 4 ++--
 tests/Composer/Test/Downloader/XzDownloaderTest.php               | 4 ++--
 tests/Composer/Test/Downloader/ZipDownloaderTest.php              | 4 ++--
 tests/Composer/Test/IO/ConsoleIOTest.php                          | 2 +-
 tests/Composer/Test/InstalledVersionsTest.php                     | 2 +-
 tests/Composer/Test/Installer/InstallationManagerTest.php         | 2 +-
 tests/Composer/Test/Installer/LibraryInstallerTest.php            | 4 ++--
 tests/Composer/Test/Installer/MetapackageInstallerTest.php        | 2 +-
 tests/Composer/Test/Installer/SuggestedPackagesReporterTest.php   | 2 +-
 tests/Composer/Test/InstallerTest.php                             | 4 ++--
 .../Composer/Test/Package/Archiver/ArchivableFilesFinderTest.php  | 4 ++--
 tests/Composer/Test/Package/Archiver/ArchiveManagerTest.php       | 2 +-
 tests/Composer/Test/Package/Archiver/ArchiverTest.php             | 4 ++--
 tests/Composer/Test/Package/Dumper/ArrayDumperTest.php            | 2 +-
 tests/Composer/Test/Package/Loader/ArrayLoaderTest.php            | 2 +-
 tests/Composer/Test/Package/Version/VersionGuesserTest.php        | 2 +-
 tests/Composer/Test/Platform/HhvmDetectorTest.php                 | 2 +-
 tests/Composer/Test/Plugin/PluginInstallerTest.php                | 4 ++--
 tests/Composer/Test/Repository/ArtifactRepositoryTest.php         | 2 +-
 tests/Composer/Test/Repository/FilterRepositoryTest.php           | 2 +-
 tests/Composer/Test/Repository/RepositoryManagerTest.php          | 4 ++--
 tests/Composer/Test/Repository/Vcs/FossilDriverTest.php           | 4 ++--
 tests/Composer/Test/Repository/Vcs/GitBitbucketDriverTest.php     | 4 ++--
 tests/Composer/Test/Repository/Vcs/GitHubDriverTest.php           | 4 ++--
 tests/Composer/Test/Repository/Vcs/GitLabDriverTest.php           | 4 ++--
 tests/Composer/Test/Repository/Vcs/HgDriverTest.php               | 4 ++--
 tests/Composer/Test/Repository/Vcs/PerforceDriverTest.php         | 4 ++--
 tests/Composer/Test/Repository/Vcs/SvnDriverTest.php              | 4 ++--
 tests/Composer/Test/Repository/VcsRepositoryTest.php              | 4 ++--
 tests/Composer/Test/Util/AuthHelperTest.php                       | 2 +-
 tests/Composer/Test/Util/BitbucketTest.php                        | 2 +-
 tests/Composer/Test/Util/ErrorHandlerTest.php                     | 4 ++--
 tests/Composer/Test/Util/FilesystemTest.php                       | 4 ++--
 tests/Composer/Test/Util/GitTest.php                              | 2 +-
 tests/Composer/Test/Util/Http/ProxyHelperTest.php                 | 4 ++--
 tests/Composer/Test/Util/Http/ProxyManagerTest.php                | 4 ++--
 tests/Composer/Test/Util/IniHelperTest.php                        | 4 ++--
 tests/Composer/Test/Util/PerforceTest.php                         | 4 ++--
 tests/Composer/Test/Util/StreamContextFactoryTest.php             | 4 ++--
 51 files changed, 84 insertions(+), 84 deletions(-)

diff --git a/tests/Composer/Test/AllFunctionalTest.php b/tests/Composer/Test/AllFunctionalTest.php
index 1e8df2f..26a8c9a 100644
--- a/tests/Composer/Test/AllFunctionalTest.php
+++ b/tests/Composer/Test/AllFunctionalTest.php
@@ -26,14 +26,14 @@ class AllFunctionalTest extends TestCase
     protected $testDir;
     private static $pharPath;
 
-    public function setUp()
+    public function setUp(): void
     {
         $this->oldcwd = getcwd();
 
         chdir(__DIR__.'/Fixtures/functional');
     }
 
-    public function tearDown()
+    public function tearDown(): void
     {
         chdir($this->oldcwd);
 
@@ -52,12 +52,12 @@ class AllFunctionalTest extends TestCase
         }
     }
 
-    public static function setUpBeforeClass()
+    public static function setUpBeforeClass(): void
     {
         self::$pharPath = self::getUniqueTmpDirectory() . '/composer.phar';
     }
 
-    public static function tearDownAfterClass()
+    public static function tearDownAfterClass(): void
     {
         $fs = new Filesystem;
         $fs->removeDirectory(dirname(self::$pharPath));
diff --git a/tests/Composer/Test/Autoload/AutoloadGeneratorTest.php b/tests/Composer/Test/Autoload/AutoloadGeneratorTest.php
index 134ebd6..e98ad6f 100644
--- a/tests/Composer/Test/Autoload/AutoloadGeneratorTest.php
+++ b/tests/Composer/Test/Autoload/AutoloadGeneratorTest.php
@@ -88,7 +88,7 @@ class AutoloadGeneratorTest extends TestCase
      */
     public $configValueMap;
 
-    protected function setUp()
+    protected function setUp(): void
     {
         $this->fs = new Filesystem;
         $that = $this;
@@ -147,7 +147,7 @@ class AutoloadGeneratorTest extends TestCase
         $this->generator = new AutoloadGenerator($this->eventDispatcher);
     }
 
-    protected function tearDown()
+    protected function tearDown(): void
     {
         chdir($this->origDir);
 
diff --git a/tests/Composer/Test/CacheTest.php b/tests/Composer/Test/CacheTest.php
index fbf188d..288cae6 100644
--- a/tests/Composer/Test/CacheTest.php
+++ b/tests/Composer/Test/CacheTest.php
@@ -23,7 +23,7 @@ class CacheTest extends TestCase
     private $filesystem;
     private $cache;
 
-    public function setUp()
+    public function setUp(): void
     {
         $this->root = $this->getUniqueTmpDirectory();
         $this->files = array();
@@ -48,7 +48,7 @@ class CacheTest extends TestCase
             ->will($this->returnValue($this->finder));
     }
 
-    protected function tearDown()
+    protected function tearDown(): void
     {
         if (is_dir($this->root)) {
             $fs = new Filesystem;
diff --git a/tests/Composer/Test/Config/JsonConfigSourceTest.php b/tests/Composer/Test/Config/JsonConfigSourceTest.php
index 8c5d641..daa530c 100644
--- a/tests/Composer/Test/Config/JsonConfigSourceTest.php
+++ b/tests/Composer/Test/Config/JsonConfigSourceTest.php
@@ -29,13 +29,13 @@ class JsonConfigSourceTest extends TestCase
         return __DIR__.'/Fixtures/'.$name;
     }
 
-    protected function setUp()
+    protected function setUp(): void
     {
         $this->fs = new Filesystem;
         $this->workingDir = $this->getUniqueTmpDirectory();
     }
 
-    protected function tearDown()
+    protected function tearDown(): void
     {
         if (is_dir($this->workingDir)) {
             $this->fs->removeDirectory($this->workingDir);
diff --git a/tests/Composer/Test/DependencyResolver/DefaultPolicyTest.php b/tests/Composer/Test/DependencyResolver/DefaultPolicyTest.php
index 42a8f2d..335a211 100644
--- a/tests/Composer/Test/DependencyResolver/DefaultPolicyTest.php
+++ b/tests/Composer/Test/DependencyResolver/DefaultPolicyTest.php
@@ -32,7 +32,7 @@ class DefaultPolicyTest extends TestCase
     /** @var DefaultPolicy */
     protected $policy;
 
-    public function setUp()
+    public function setUp(): void
     {
         $this->repositorySet = new RepositorySet('dev');
         $this->repo = new ArrayRepository;
diff --git a/tests/Composer/Test/DependencyResolver/RuleSetIteratorTest.php b/tests/Composer/Test/DependencyResolver/RuleSetIteratorTest.php
index 379fcf4..ef8a9ae 100644
--- a/tests/Composer/Test/DependencyResolver/RuleSetIteratorTest.php
+++ b/tests/Composer/Test/DependencyResolver/RuleSetIteratorTest.php
@@ -24,7 +24,7 @@ class RuleSetIteratorTest extends TestCase
     protected $rules;
     protected $pool;
 
-    protected function setUp()
+    protected function setUp(): void
     {
         $this->pool = new Pool();
 
diff --git a/tests/Composer/Test/DependencyResolver/SolverTest.php b/tests/Composer/Test/DependencyResolver/SolverTest.php
index 24cde47..7e173c9 100644
--- a/tests/Composer/Test/DependencyResolver/SolverTest.php
+++ b/tests/Composer/Test/DependencyResolver/SolverTest.php
@@ -35,7 +35,7 @@ class SolverTest extends TestCase
     protected $solver;
     protected $pool;
 
-    public function setUp()
+    public function setUp(): void
     {
         $this->repoSet = new RepositorySet();
         $this->repo = new ArrayRepository;
diff --git a/tests/Composer/Test/DependencyResolver/TransactionTest.php b/tests/Composer/Test/DependencyResolver/TransactionTest.php
index 39354c0..3c3c087 100644
--- a/tests/Composer/Test/DependencyResolver/TransactionTest.php
+++ b/tests/Composer/Test/DependencyResolver/TransactionTest.php
@@ -18,7 +18,7 @@ use Composer\Test\TestCase;
 
 class TransactionTest extends TestCase
 {
-    public function setUp()
+    public function setUp(): void
     {
     }
 
diff --git a/tests/Composer/Test/Downloader/DownloadManagerTest.php b/tests/Composer/Test/Downloader/DownloadManagerTest.php
index b755e33..e61a365 100644
--- a/tests/Composer/Test/Downloader/DownloadManagerTest.php
+++ b/tests/Composer/Test/Downloader/DownloadManagerTest.php
@@ -20,7 +20,7 @@ class DownloadManagerTest extends TestCase
     protected $filesystem;
     protected $io;
 
-    public function setUp()
+    public function setUp(): void
     {
         $this->filesystem = $this->getMockBuilder('Composer\Util\Filesystem')->getMock();
         $this->io = $this->getMockBuilder('Composer\IO\IOInterface')->getMock();
diff --git a/tests/Composer/Test/Downloader/FossilDownloaderTest.php b/tests/Composer/Test/Downloader/FossilDownloaderTest.php
index 5121d85..dbd07cd 100644
--- a/tests/Composer/Test/Downloader/FossilDownloaderTest.php
+++ b/tests/Composer/Test/Downloader/FossilDownloaderTest.php
@@ -22,12 +22,12 @@ class FossilDownloaderTest extends TestCase
     /** @var string */
     private $workingDir;
 
-    protected function setUp()
+    protected function setUp(): void
     {
         $this->workingDir = $this->getUniqueTmpDirectory();
     }
 
-    protected function tearDown()
+    protected function tearDown(): void
     {
         if (is_dir($this->workingDir)) {
             $fs = new Filesystem;
diff --git a/tests/Composer/Test/Downloader/GitDownloaderTest.php b/tests/Composer/Test/Downloader/GitDownloaderTest.php
index c16c925..e09b6d4 100644
--- a/tests/Composer/Test/Downloader/GitDownloaderTest.php
+++ b/tests/Composer/Test/Downloader/GitDownloaderTest.php
@@ -26,7 +26,7 @@ class GitDownloaderTest extends TestCase
     /** @var string */
     private $workingDir;
 
-    protected function setUp()
+    protected function setUp(): void
     {
         $this->skipIfNotExecutable('git');
 
@@ -36,7 +36,7 @@ class GitDownloaderTest extends TestCase
         $this->workingDir = $this->getUniqueTmpDirectory();
     }
 
-    protected function tearDown()
+    protected function tearDown(): void
     {
         if (is_dir($this->workingDir)) {
             $this->fs->removeDirectory($this->workingDir);
diff --git a/tests/Composer/Test/Downloader/HgDownloaderTest.php b/tests/Composer/Test/Downloader/HgDownloaderTest.php
index cecf78b..64f72d1 100644
--- a/tests/Composer/Test/Downloader/HgDownloaderTest.php
+++ b/tests/Composer/Test/Downloader/HgDownloaderTest.php
@@ -22,12 +22,12 @@ class HgDownloaderTest extends TestCase
     /** @var string */
     private $workingDir;
 
-    protected function setUp()
+    protected function setUp(): void
     {
         $this->workingDir = $this->getUniqueTmpDirectory();
     }
 
-    protected function tearDown()
+    protected function tearDown(): void
     {
         if (is_dir($this->workingDir)) {
             $fs = new Filesystem;
diff --git a/tests/Composer/Test/Downloader/PerforceDownloaderTest.php b/tests/Composer/Test/Downloader/PerforceDownloaderTest.php
index ca93863..407e09c 100644
--- a/tests/Composer/Test/Downloader/PerforceDownloaderTest.php
+++ b/tests/Composer/Test/Downloader/PerforceDownloaderTest.php
@@ -35,7 +35,7 @@ class PerforceDownloaderTest extends TestCase
     protected $repository;
     protected $testPath;
 
-    protected function setUp()
+    protected function setUp(): void
     {
         $this->testPath = $this->getUniqueTmpDirectory();
         $this->repoConfig = $this->getRepoConfig();
@@ -47,7 +47,7 @@ class PerforceDownloaderTest extends TestCase
         $this->downloader = new PerforceDownloader($this->io, $this->config, $this->processExecutor);
     }
 
-    protected function tearDown()
+    protected function tearDown(): void
     {
         $this->downloader = null;
         $this->package = null;
diff --git a/tests/Composer/Test/Downloader/XzDownloaderTest.php b/tests/Composer/Test/Downloader/XzDownloaderTest.php
index 1b28e70..7032004 100644
--- a/tests/Composer/Test/Downloader/XzDownloaderTest.php
+++ b/tests/Composer/Test/Downloader/XzDownloaderTest.php
@@ -31,7 +31,7 @@ class XzDownloaderTest extends TestCase
      */
     private $testDir;
 
-    public function setUp()
+    public function setUp(): void
     {
         if (Platform::isWindows()) {
             $this->markTestSkipped('Skip test on Windows');
@@ -39,7 +39,7 @@ class XzDownloaderTest extends TestCase
         $this->testDir = $this->getUniqueTmpDirectory();
     }
 
-    public function tearDown()
+    public function tearDown(): void
     {
         $this->fs = new Filesystem;
         $this->fs->removeDirectory($this->testDir);
diff --git a/tests/Composer/Test/Downloader/ZipDownloaderTest.php b/tests/Composer/Test/Downloader/ZipDownloaderTest.php
index e210784..db43598 100644
--- a/tests/Composer/Test/Downloader/ZipDownloaderTest.php
+++ b/tests/Composer/Test/Downloader/ZipDownloaderTest.php
@@ -30,7 +30,7 @@ class ZipDownloaderTest extends TestCase
     private $config;
     private $package;
 
-    public function setUp()
+    public function setUp(): void
     {
         $this->testDir = $this->getUniqueTmpDirectory();
         $this->io = $this->getMockBuilder('Composer\IO\IOInterface')->getMock();
@@ -40,7 +40,7 @@ class ZipDownloaderTest extends TestCase
         $this->package = $this->getMockBuilder('Composer\Package\PackageInterface')->getMock();
     }
 
-    public function tearDown()
+    public function tearDown(): void
     {
         $fs = new Filesystem;
         $fs->removeDirectory($this->testDir);
diff --git a/tests/Composer/Test/IO/ConsoleIOTest.php b/tests/Composer/Test/IO/ConsoleIOTest.php
index 1ff8617..16dc26f 100644
--- a/tests/Composer/Test/IO/ConsoleIOTest.php
+++ b/tests/Composer/Test/IO/ConsoleIOTest.php
@@ -86,7 +86,7 @@ class ConsoleIOTest extends TestCase
                     $result = preg_match("[(.*)/(.*) First line]", $messages[0]) > 0;
                     $result = $result && preg_match("[(.*)/(.*) Second line]", $messages[1]) > 0;
 
-                    return $result;
+                    return (bool) $result;
                 }),
                 $this->equalTo(false)
             );
diff --git a/tests/Composer/Test/InstalledVersionsTest.php b/tests/Composer/Test/InstalledVersionsTest.php
index c1f4bb1..58cf1d3 100644
--- a/tests/Composer/Test/InstalledVersionsTest.php
+++ b/tests/Composer/Test/InstalledVersionsTest.php
@@ -17,7 +17,7 @@ use Composer\Semver\VersionParser;
 
 class InstalledVersionsTest extends TestCase
 {
-    public function setUp()
+    public function setUp(): void
     {
         InstalledVersions::reload(require __DIR__.'/Repository/Fixtures/installed.php');
     }
diff --git a/tests/Composer/Test/Installer/InstallationManagerTest.php b/tests/Composer/Test/Installer/InstallationManagerTest.php
index 692aa1d..434b2e2 100644
--- a/tests/Composer/Test/Installer/InstallationManagerTest.php
+++ b/tests/Composer/Test/Installer/InstallationManagerTest.php
@@ -25,7 +25,7 @@ class InstallationManagerTest extends TestCase
     protected $loop;
     protected $io;
 
-    public function setUp()
+    public function setUp(): void
     {
         $this->loop = $this->getMockBuilder('Composer\Util\Loop')->disableOriginalConstructor()->getMock();
         $this->repository = $this->getMockBuilder('Composer\Repository\InstalledRepositoryInterface')->getMock();
diff --git a/tests/Composer/Test/Installer/LibraryInstallerTest.php b/tests/Composer/Test/Installer/LibraryInstallerTest.php
index f0f509d..b182fb8 100644
--- a/tests/Composer/Test/Installer/LibraryInstallerTest.php
+++ b/tests/Composer/Test/Installer/LibraryInstallerTest.php
@@ -30,7 +30,7 @@ class LibraryInstallerTest extends TestCase
     protected $io;
     protected $fs;
 
-    protected function setUp()
+    protected function setUp(): void
     {
         $this->fs = new Filesystem;
 
@@ -61,7 +61,7 @@ class LibraryInstallerTest extends TestCase
         $this->io = $this->getMockBuilder('Composer\IO\IOInterface')->getMock();
     }
 
-    protected function tearDown()
+    protected function tearDown(): void
     {
         $this->fs->removeDirectory($this->rootDir);
     }
diff --git a/tests/Composer/Test/Installer/MetapackageInstallerTest.php b/tests/Composer/Test/Installer/MetapackageInstallerTest.php
index f26ba0b..4edbb7c 100644
--- a/tests/Composer/Test/Installer/MetapackageInstallerTest.php
+++ b/tests/Composer/Test/Installer/MetapackageInstallerTest.php
@@ -21,7 +21,7 @@ class MetapackageInstallerTest extends TestCase
     private $installer;
     private $io;
 
-    protected function setUp()
+    protected function setUp(): void
     {
         $this->repository = $this->getMockBuilder('Composer\Repository\InstalledRepositoryInterface')->getMock();
 
diff --git a/tests/Composer/Test/Installer/SuggestedPackagesReporterTest.php b/tests/Composer/Test/Installer/SuggestedPackagesReporterTest.php
index fb80033..daae95d 100644
--- a/tests/Composer/Test/Installer/SuggestedPackagesReporterTest.php
+++ b/tests/Composer/Test/Installer/SuggestedPackagesReporterTest.php
@@ -23,7 +23,7 @@ class SuggestedPackagesReporterTest extends TestCase
     private $io;
     private $suggestedPackagesReporter;
 
-    protected function setUp()
+    protected function setUp(): void
     {
         $this->io = $this->getMockBuilder('Composer\IO\IOInterface')->getMock();
 
diff --git a/tests/Composer/Test/InstallerTest.php b/tests/Composer/Test/InstallerTest.php
index 4ac3e5c..8bd541d 100644
--- a/tests/Composer/Test/InstallerTest.php
+++ b/tests/Composer/Test/InstallerTest.php
@@ -41,13 +41,13 @@ class InstallerTest extends TestCase
     protected $prevCwd;
     protected $tempComposerHome;
 
-    public function setUp()
+    public function setUp(): void
     {
         $this->prevCwd = getcwd();
         chdir(__DIR__);
     }
 
-    public function tearDown()
+    public function tearDown(): void
     {
         chdir($this->prevCwd);
         if (is_dir($this->tempComposerHome)) {
diff --git a/tests/Composer/Test/Package/Archiver/ArchivableFilesFinderTest.php b/tests/Composer/Test/Package/Archiver/ArchivableFilesFinderTest.php
index b8f1109..969469b 100644
--- a/tests/Composer/Test/Package/Archiver/ArchivableFilesFinderTest.php
+++ b/tests/Composer/Test/Package/Archiver/ArchivableFilesFinderTest.php
@@ -23,7 +23,7 @@ class ArchivableFilesFinderTest extends TestCase
     protected $finder;
     protected $fs;
 
-    protected function setUp()
+    protected function setUp(): void
     {
         $fs = new Filesystem;
         $this->fs = $fs;
@@ -85,7 +85,7 @@ class ArchivableFilesFinderTest extends TestCase
         }
     }
 
-    protected function tearDown()
+    protected function tearDown(): void
     {
         $fs = new Filesystem;
         $fs->removeDirectory($this->sources);
diff --git a/tests/Composer/Test/Package/Archiver/ArchiveManagerTest.php b/tests/Composer/Test/Package/Archiver/ArchiveManagerTest.php
index 4bdac61..008f0bb 100644
--- a/tests/Composer/Test/Package/Archiver/ArchiveManagerTest.php
+++ b/tests/Composer/Test/Package/Archiver/ArchiveManagerTest.php
@@ -29,7 +29,7 @@ class ArchiveManagerTest extends ArchiverTest
 
     protected $targetDir;
 
-    public function setUp()
+    public function setUp(): void
     {
         parent::setUp();
 
diff --git a/tests/Composer/Test/Package/Archiver/ArchiverTest.php b/tests/Composer/Test/Package/Archiver/ArchiverTest.php
index 8926d76..72f80b2 100644
--- a/tests/Composer/Test/Package/Archiver/ArchiverTest.php
+++ b/tests/Composer/Test/Package/Archiver/ArchiverTest.php
@@ -34,14 +34,14 @@ abstract class ArchiverTest extends TestCase
      */
     protected $testDir;
 
-    public function setUp()
+    public function setUp(): void
     {
         $this->filesystem = new Filesystem();
         $this->process = new ProcessExecutor();
         $this->testDir = $this->getUniqueTmpDirectory();
     }
 
-    public function tearDown()
+    public function tearDown(): void
     {
         $this->filesystem->removeDirectory($this->testDir);
     }
diff --git a/tests/Composer/Test/Package/Dumper/ArrayDumperTest.php b/tests/Composer/Test/Package/Dumper/ArrayDumperTest.php
index dbcdf84..947da11 100644
--- a/tests/Composer/Test/Package/Dumper/ArrayDumperTest.php
+++ b/tests/Composer/Test/Package/Dumper/ArrayDumperTest.php
@@ -28,7 +28,7 @@ class ArrayDumperTest extends TestCase
      */
     private $package;
 
-    public function setUp()
+    public function setUp(): void
     {
         $this->dumper = new ArrayDumper();
         $this->package = $this->getMockBuilder('Composer\Package\CompletePackageInterface')->getMock();
diff --git a/tests/Composer/Test/Package/Loader/ArrayLoaderTest.php b/tests/Composer/Test/Package/Loader/ArrayLoaderTest.php
index 1d4f866..f6bc66b 100644
--- a/tests/Composer/Test/Package/Loader/ArrayLoaderTest.php
+++ b/tests/Composer/Test/Package/Loader/ArrayLoaderTest.php
@@ -23,7 +23,7 @@ class ArrayLoaderTest extends TestCase
      */
     private $loader;
 
-    public function setUp()
+    public function setUp(): void
     {
         $this->loader = new ArrayLoader(null);
     }
diff --git a/tests/Composer/Test/Package/Version/VersionGuesserTest.php b/tests/Composer/Test/Package/Version/VersionGuesserTest.php
index 8df182d..2a829c8 100644
--- a/tests/Composer/Test/Package/Version/VersionGuesserTest.php
+++ b/tests/Composer/Test/Package/Version/VersionGuesserTest.php
@@ -21,7 +21,7 @@ use Composer\Util\ProcessExecutor;
 
 class VersionGuesserTest extends TestCase
 {
-    public function setUp()
+    public function setUp(): void
     {
         if (!function_exists('proc_open')) {
             $this->markTestSkipped('proc_open() is not available');
diff --git a/tests/Composer/Test/Platform/HhvmDetectorTest.php b/tests/Composer/Test/Platform/HhvmDetectorTest.php
index 68dc4a8..7a371dc 100644
--- a/tests/Composer/Test/Platform/HhvmDetectorTest.php
+++ b/tests/Composer/Test/Platform/HhvmDetectorTest.php
@@ -22,7 +22,7 @@ class HhvmDetectorTest extends TestCase
 {
     private $hhvmDetector;
 
-    protected function setUp()
+    protected function setUp(): void
     {
         $this->hhvmDetector = new HhvmDetector();
         $this->hhvmDetector->reset();
diff --git a/tests/Composer/Test/Plugin/PluginInstallerTest.php b/tests/Composer/Test/Plugin/PluginInstallerTest.php
index c5c587b..d212798 100644
--- a/tests/Composer/Test/Plugin/PluginInstallerTest.php
+++ b/tests/Composer/Test/Plugin/PluginInstallerTest.php
@@ -68,7 +68,7 @@ class PluginInstallerTest extends TestCase
      */
     protected $io;
 
-    protected function setUp()
+    protected function setUp(): void
     {
         $loader = new JsonLoader(new ArrayLoader());
         $this->packages = array();
@@ -126,7 +126,7 @@ class PluginInstallerTest extends TestCase
         ));
     }
 
-    protected function tearDown()
+    protected function tearDown(): void
     {
         $filesystem = new Filesystem();
         $filesystem->removeDirectory($this->directory);
diff --git a/tests/Composer/Test/Repository/ArtifactRepositoryTest.php b/tests/Composer/Test/Repository/ArtifactRepositoryTest.php
index b164a43..49c37a6 100644
--- a/tests/Composer/Test/Repository/ArtifactRepositoryTest.php
+++ b/tests/Composer/Test/Repository/ArtifactRepositoryTest.php
@@ -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')) {
diff --git a/tests/Composer/Test/Repository/FilterRepositoryTest.php b/tests/Composer/Test/Repository/FilterRepositoryTest.php
index 645d5cb..c1f974e 100644
--- a/tests/Composer/Test/Repository/FilterRepositoryTest.php
+++ b/tests/Composer/Test/Repository/FilterRepositoryTest.php
@@ -22,7 +22,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'));
diff --git a/tests/Composer/Test/Repository/RepositoryManagerTest.php b/tests/Composer/Test/Repository/RepositoryManagerTest.php
index 7d545df..50bf1c7 100644
--- a/tests/Composer/Test/Repository/RepositoryManagerTest.php
+++ b/tests/Composer/Test/Repository/RepositoryManagerTest.php
@@ -20,12 +20,12 @@ class RepositoryManagerTest extends TestCase
 {
     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();
diff --git a/tests/Composer/Test/Repository/Vcs/FossilDriverTest.php b/tests/Composer/Test/Repository/Vcs/FossilDriverTest.php
index a6953f8..4b2266e 100644
--- a/tests/Composer/Test/Repository/Vcs/FossilDriverTest.php
+++ b/tests/Composer/Test/Repository/Vcs/FossilDriverTest.php
@@ -22,7 +22,7 @@ class FossilDriverTest extends TestCase
     protected $home;
     protected $config;
 
-    public function setUp()
+    public function setUp(): void
     {
         $this->home = $this->getUniqueTmpDirectory();
         $this->config = new Config();
@@ -33,7 +33,7 @@ class FossilDriverTest extends TestCase
         ));
     }
 
-    public function tearDown()
+    public function tearDown(): void
     {
         $fs = new Filesystem();
         $fs->removeDirectory($this->home);
diff --git a/tests/Composer/Test/Repository/Vcs/GitBitbucketDriverTest.php b/tests/Composer/Test/Repository/Vcs/GitBitbucketDriverTest.php
index 0bad336..970e053 100644
--- a/tests/Composer/Test/Repository/Vcs/GitBitbucketDriverTest.php
+++ b/tests/Composer/Test/Repository/Vcs/GitBitbucketDriverTest.php
@@ -35,7 +35,7 @@ class GitBitbucketDriverTest extends TestCase
     /** @type string */
     private $originUrl = 'bitbucket.org';
 
-    protected function setUp()
+    protected function setUp(): void
     {
         $this->io = $this->getMockBuilder('Composer\IO\IOInterface')->getMock();
 
@@ -53,7 +53,7 @@ class GitBitbucketDriverTest extends TestCase
             ->getMock();
     }
 
-    public function tearDown()
+    public function tearDown(): void
     {
         $fs = new Filesystem;
         $fs->removeDirectory($this->home);
diff --git a/tests/Composer/Test/Repository/Vcs/GitHubDriverTest.php b/tests/Composer/Test/Repository/Vcs/GitHubDriverTest.php
index 7c2727c..1bc7809 100644
--- a/tests/Composer/Test/Repository/Vcs/GitHubDriverTest.php
+++ b/tests/Composer/Test/Repository/Vcs/GitHubDriverTest.php
@@ -24,7 +24,7 @@ class GitHubDriverTest extends TestCase
     private $home;
     private $config;
 
-    public function setUp()
+    public function setUp(): void
     {
         $this->home = $this->getUniqueTmpDirectory();
         $this->config = new Config();
@@ -35,7 +35,7 @@ class GitHubDriverTest extends TestCase
         ));
     }
 
-    public function tearDown()
+    public function tearDown(): void
     {
         $fs = new Filesystem;
         $fs->removeDirectory($this->home);
diff --git a/tests/Composer/Test/Repository/Vcs/GitLabDriverTest.php b/tests/Composer/Test/Repository/Vcs/GitLabDriverTest.php
index 0fd2fa9..6680ae1 100644
--- a/tests/Composer/Test/Repository/Vcs/GitLabDriverTest.php
+++ b/tests/Composer/Test/Repository/Vcs/GitLabDriverTest.php
@@ -30,7 +30,7 @@ class GitLabDriverTest extends TestCase
     private $process;
     private $httpDownloader;
 
-    public function setUp()
+    public function setUp(): void
     {
         $this->home = $this->getUniqueTmpDirectory();
         $this->config = new Config();
@@ -51,7 +51,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);
diff --git a/tests/Composer/Test/Repository/Vcs/HgDriverTest.php b/tests/Composer/Test/Repository/Vcs/HgDriverTest.php
index 11143b4..c22439b 100644
--- a/tests/Composer/Test/Repository/Vcs/HgDriverTest.php
+++ b/tests/Composer/Test/Repository/Vcs/HgDriverTest.php
@@ -26,7 +26,7 @@ class HgDriverTest extends TestCase
     /** @type 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);
diff --git a/tests/Composer/Test/Repository/Vcs/PerforceDriverTest.php b/tests/Composer/Test/Repository/Vcs/PerforceDriverTest.php
index 1c44e82..2ad7efc 100644
--- a/tests/Composer/Test/Repository/Vcs/PerforceDriverTest.php
+++ b/tests/Composer/Test/Repository/Vcs/PerforceDriverTest.php
@@ -36,7 +36,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);
@@ -49,7 +49,7 @@ class PerforceDriverTest extends TestCase
         $this->overrideDriverInternalPerforce($this->perforce);
     }
 
-    protected function tearDown()
+    protected function tearDown(): void
     {
         //cleanup directory under test path
         $fs = new Filesystem;
diff --git a/tests/Composer/Test/Repository/Vcs/SvnDriverTest.php b/tests/Composer/Test/Repository/Vcs/SvnDriverTest.php
index 9c61c31..edb6be8 100644
--- a/tests/Composer/Test/Repository/Vcs/SvnDriverTest.php
+++ b/tests/Composer/Test/Repository/Vcs/SvnDriverTest.php
@@ -22,7 +22,7 @@ class SvnDriverTest extends TestCase
     protected $home;
     protected $config;
 
-    public function setUp()
+    public function setUp(): void
     {
         $this->home = $this->getUniqueTmpDirectory();
         $this->config = new Config();
@@ -33,7 +33,7 @@ class SvnDriverTest extends TestCase
         ));
     }
 
-    public function tearDown()
+    public function tearDown(): void
     {
         $fs = new Filesystem();
         $fs->removeDirectory($this->home);
diff --git a/tests/Composer/Test/Repository/VcsRepositoryTest.php b/tests/Composer/Test/Repository/VcsRepositoryTest.php
index b1d0e5a..223ba99 100644
--- a/tests/Composer/Test/Repository/VcsRepositoryTest.php
+++ b/tests/Composer/Test/Repository/VcsRepositoryTest.php
@@ -118,7 +118,7 @@ class VcsRepositoryTest extends TestCase
         chdir($oldCwd);
     }
 
-    public function setUp()
+    public function setUp(): void
     {
         if (!self::$gitRepo) {
             $this->initialize();
@@ -128,7 +128,7 @@ class VcsRepositoryTest extends TestCase
         }
     }
 
-    public static function tearDownAfterClass()
+    public static function tearDownAfterClass(): void
     {
         $fs = new Filesystem;
         $fs->removeDirectory(self::$composerHome);
diff --git a/tests/Composer/Test/Util/AuthHelperTest.php b/tests/Composer/Test/Util/AuthHelperTest.php
index 33f6438..c4e0e21 100644
--- a/tests/Composer/Test/Util/AuthHelperTest.php
+++ b/tests/Composer/Test/Util/AuthHelperTest.php
@@ -31,7 +31,7 @@ class AuthHelperTest extends TestCase
     /** @type AuthHelper */
     private $authHelper;
 
-    protected function setUp()
+    protected function setUp(): void
     {
         $this->io = $this
             ->getMockBuilder('Composer\IO\IOInterface')
diff --git a/tests/Composer/Test/Util/BitbucketTest.php b/tests/Composer/Test/Util/BitbucketTest.php
index 3262c2f..4ddfd48 100644
--- a/tests/Composer/Test/Util/BitbucketTest.php
+++ b/tests/Composer/Test/Util/BitbucketTest.php
@@ -40,7 +40,7 @@ class BitbucketTest extends TestCase
     /** @var int */
     private $time;
 
-    protected function setUp()
+    protected function setUp(): void
     {
         $this->io = $this
             ->getMockBuilder('Composer\IO\ConsoleIO')
diff --git a/tests/Composer/Test/Util/ErrorHandlerTest.php b/tests/Composer/Test/Util/ErrorHandlerTest.php
index 486aa1c..66bf41f 100644
--- a/tests/Composer/Test/Util/ErrorHandlerTest.php
+++ b/tests/Composer/Test/Util/ErrorHandlerTest.php
@@ -20,12 +20,12 @@ use Composer\Test\TestCase;
  */
 class ErrorHandlerTest extends TestCase
 {
-    public function setUp()
+    public function setUp(): void
     {
         ErrorHandler::register();
     }
 
-    public function tearDown()
+    public function tearDown(): void
     {
         restore_error_handler();
     }
diff --git a/tests/Composer/Test/Util/FilesystemTest.php b/tests/Composer/Test/Util/FilesystemTest.php
index d821c05..deb3c98 100644
--- a/tests/Composer/Test/Util/FilesystemTest.php
+++ b/tests/Composer/Test/Util/FilesystemTest.php
@@ -32,14 +32,14 @@ class FilesystemTest extends TestCase
      */
     private $testFile;
 
-    public function setUp()
+    public function setUp(): void
     {
         $this->fs = new Filesystem;
         $this->workingDir = $this->getUniqueTmpDirectory();
         $this->testFile = $this->getUniqueTmpDirectory() . '/composer_test_file';
     }
 
-    public function tearDown()
+    public function tearDown(): void
     {
         if (is_dir($this->workingDir)) {
             $this->fs->removeDirectory($this->workingDir);
diff --git a/tests/Composer/Test/Util/GitTest.php b/tests/Composer/Test/Util/GitTest.php
index 66ad8ff..349b586 100644
--- a/tests/Composer/Test/Util/GitTest.php
+++ b/tests/Composer/Test/Util/GitTest.php
@@ -32,7 +32,7 @@ class GitTest extends TestCase
     /** @var Filesystem&\PHPUnit_Framework_MockObject_MockObject */
     private $fs;
 
-    protected function setUp()
+    protected function setUp(): void
     {
         $this->io = $this->getMockBuilder('Composer\IO\IOInterface')->getMock();
         $this->config = $this->getMockBuilder('Composer\Config')->disableOriginalConstructor()->getMock();
diff --git a/tests/Composer/Test/Util/Http/ProxyHelperTest.php b/tests/Composer/Test/Util/Http/ProxyHelperTest.php
index c79ad25..3436b2e 100644
--- a/tests/Composer/Test/Util/Http/ProxyHelperTest.php
+++ b/tests/Composer/Test/Util/Http/ProxyHelperTest.php
@@ -17,7 +17,7 @@ use Composer\Test\TestCase;
 
 class ProxyHelperTest extends TestCase
 {
-    protected function setUp()
+    protected function setUp(): void
     {
         unset(
             $_SERVER['HTTP_PROXY'],
@@ -30,7 +30,7 @@ class ProxyHelperTest extends TestCase
         );
     }
 
-    protected function tearDown()
+    protected function tearDown(): void
     {
         unset(
             $_SERVER['HTTP_PROXY'],
diff --git a/tests/Composer/Test/Util/Http/ProxyManagerTest.php b/tests/Composer/Test/Util/Http/ProxyManagerTest.php
index 1a2cc4e..4c487fa 100644
--- a/tests/Composer/Test/Util/Http/ProxyManagerTest.php
+++ b/tests/Composer/Test/Util/Http/ProxyManagerTest.php
@@ -17,7 +17,7 @@ use Composer\Test\TestCase;
 
 class ProxyManagerTest extends TestCase
 {
-    protected function setUp()
+    protected function setUp(): void
     {
         unset(
             $_SERVER['HTTP_PROXY'],
@@ -31,7 +31,7 @@ class ProxyManagerTest extends TestCase
         ProxyManager::reset();
     }
 
-    protected function tearDown()
+    protected function tearDown(): void
     {
         unset(
             $_SERVER['HTTP_PROXY'],
diff --git a/tests/Composer/Test/Util/IniHelperTest.php b/tests/Composer/Test/Util/IniHelperTest.php
index 4304898..64dcd35 100644
--- a/tests/Composer/Test/Util/IniHelperTest.php
+++ b/tests/Composer/Test/Util/IniHelperTest.php
@@ -70,7 +70,7 @@ class IniHelperTest extends TestCase
         $this->assertEquals($paths, IniHelper::getAll());
     }
 
-    public static function setUpBeforeClass()
+    public static function setUpBeforeClass(): void
     {
         // Register our name with XdebugHandler
         $xdebug = new XdebugHandler('composer');
@@ -78,7 +78,7 @@ class IniHelperTest extends TestCase
         self::$envOriginal = getenv('COMPOSER_ORIGINAL_INIS');
     }
 
-    public static function tearDownAfterClass()
+    public static function tearDownAfterClass(): void
     {
         // Restore original state
         if (false !== self::$envOriginal) {
diff --git a/tests/Composer/Test/Util/PerforceTest.php b/tests/Composer/Test/Util/PerforceTest.php
index 2c86227..6483df7 100644
--- a/tests/Composer/Test/Util/PerforceTest.php
+++ b/tests/Composer/Test/Util/PerforceTest.php
@@ -33,7 +33,7 @@ class PerforceTest extends TestCase
     const TEST_PORT = 'port';
     const TEST_PATH = 'path';
 
-    protected function setUp()
+    protected function setUp(): void
     {
         $this->processExecutor = $this->getMockBuilder('Composer\Util\ProcessExecutor')->getMock();
         $this->repoConfig = $this->getTestRepoConfig();
@@ -41,7 +41,7 @@ class PerforceTest extends TestCase
         $this->createNewPerforceWithWindowsFlag(true);
     }
 
-    protected function tearDown()
+    protected function tearDown(): void
     {
         $this->perforce = null;
         $this->io = null;
diff --git a/tests/Composer/Test/Util/StreamContextFactoryTest.php b/tests/Composer/Test/Util/StreamContextFactoryTest.php
index c28b95b..0f6d741 100644
--- a/tests/Composer/Test/Util/StreamContextFactoryTest.php
+++ b/tests/Composer/Test/Util/StreamContextFactoryTest.php
@@ -18,13 +18,13 @@ use Composer\Test\TestCase;
 
 class StreamContextFactoryTest extends TestCase
 {
-    protected function setUp()
+    protected function setUp(): void
     {
         unset($_SERVER['HTTP_PROXY'], $_SERVER['http_proxy'], $_SERVER['HTTPS_PROXY'], $_SERVER['https_proxy'], $_SERVER['NO_PROXY'], $_SERVER['no_proxy']);
         ProxyManager::reset();
     }
 
-    protected function tearDown()
+    protected function tearDown(): void
     {
         unset($_SERVER['HTTP_PROXY'], $_SERVER['http_proxy'], $_SERVER['HTTPS_PROXY'], $_SERVER['https_proxy'], $_SERVER['NO_PROXY'], $_SERVER['no_proxy']);
         ProxyManager::reset();
