phpstan: update tests/Composer/Test/Installer/* to level 6 standard (#10225)
parent
3ccb54832b
commit
c2a2198089
|
@ -21,8 +21,19 @@ use Composer\Test\TestCase;
|
|||
|
||||
class InstallationManagerTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* @var \Composer\Repository\InstalledRepositoryInterface&\PHPUnit\Framework\MockObject\MockObject
|
||||
*/
|
||||
protected $repository;
|
||||
|
||||
/**
|
||||
* @var \Composer\Util\Loop&\PHPUnit\Framework\MockObject\MockObject
|
||||
*/
|
||||
protected $loop;
|
||||
|
||||
/**
|
||||
* @var \Composer\IO\IOInterface&\PHPUnit\Framework\MockObject\MockObject
|
||||
*/
|
||||
protected $io;
|
||||
|
||||
public function setUp()
|
||||
|
@ -282,12 +293,18 @@ class InstallationManagerTest extends TestCase
|
|||
$manager->ensureBinariesPresence($package);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Composer\Installer\InstallerInterface&\PHPUnit\Framework\MockObject\MockObject
|
||||
*/
|
||||
private function createInstallerMock()
|
||||
{
|
||||
return $this->getMockBuilder('Composer\Installer\InstallerInterface')
|
||||
->getMock();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Composer\Package\PackageInterface&\PHPUnit\Framework\MockObject\MockObject
|
||||
*/
|
||||
private function createPackageMock()
|
||||
{
|
||||
$mock = $this->getMockBuilder('Composer\Package\PackageInterface')
|
||||
|
|
|
@ -20,14 +20,49 @@ use Composer\Config;
|
|||
|
||||
class LibraryInstallerTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* @var \Composer\Composer
|
||||
*/
|
||||
protected $composer;
|
||||
|
||||
/**
|
||||
* @var \Composer\Config
|
||||
*/
|
||||
protected $config;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $rootDir;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $vendorDir;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $binDir;
|
||||
|
||||
/**
|
||||
* @var \Composer\Downloader\DownloadManager&\PHPUnit\Framework\MockObject\MockObject
|
||||
*/
|
||||
protected $dm;
|
||||
|
||||
/**
|
||||
* @var \Composer\Repository\InstalledRepositoryInterface&\PHPUnit\Framework\MockObject\MockObject
|
||||
*/
|
||||
protected $repository;
|
||||
|
||||
/**
|
||||
* @var \Composer\IO\IOInterface&\PHPUnit\Framework\MockObject\MockObject
|
||||
*/
|
||||
protected $io;
|
||||
|
||||
/**
|
||||
* @var \Composer\Util\Filesystem
|
||||
*/
|
||||
protected $fs;
|
||||
|
||||
protected function setUp()
|
||||
|
@ -285,6 +320,9 @@ class LibraryInstallerTest extends TestCase
|
|||
$library->ensureBinariesPresence($package);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Composer\Package\PackageInterface&\PHPUnit\Framework\MockObject\MockObject
|
||||
*/
|
||||
protected function createPackageMock()
|
||||
{
|
||||
return $this->getMockBuilder('Composer\Package\Package')
|
||||
|
|
|
@ -107,6 +107,9 @@ class MetapackageInstallerTest extends TestCase
|
|||
$this->installer->uninstall($this->repository, $package);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Composer\Package\PackageInterface&\PHPUnit\Framework\MockObject\MockObject
|
||||
*/
|
||||
private function createPackageMock()
|
||||
{
|
||||
return $this->getMockBuilder('Composer\Package\Package')
|
||||
|
|
|
@ -20,7 +20,14 @@ use Composer\Test\TestCase;
|
|||
*/
|
||||
class SuggestedPackagesReporterTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* @var \PHPUnit\Framework\MockObject\MockObject
|
||||
*/
|
||||
private $io;
|
||||
|
||||
/**
|
||||
* @var \Composer\Installer\SuggestedPackagesReporter
|
||||
*/
|
||||
private $suggestedPackagesReporter;
|
||||
|
||||
protected function setUp()
|
||||
|
@ -267,6 +274,9 @@ class SuggestedPackagesReporterTest extends TestCase
|
|||
$this->suggestedPackagesReporter->output(SuggestedPackagesReporter::MODE_BY_PACKAGE, $repository);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<string, string>
|
||||
*/
|
||||
private function getSuggestedPackageArray()
|
||||
{
|
||||
return array(
|
||||
|
@ -276,6 +286,9 @@ class SuggestedPackagesReporterTest extends TestCase
|
|||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Composer\Package\PackageInterface&\PHPUnit\Framework\MockObject\MockObject
|
||||
*/
|
||||
private function createPackageMock()
|
||||
{
|
||||
return $this->getMockBuilder('Composer\Package\Package')
|
||||
|
|
Loading…
Reference in New Issue