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

phpstan: update tests/Composer/Test/Autoload/* to level 6 standard (#10223)

This commit is contained in:
megubyte 2021-10-26 20:48:56 +01:00 committed by GitHub
parent 3d5a100018
commit 135f806f6f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 45 additions and 2 deletions

View file

@ -33,6 +33,9 @@ class ClassMapGeneratorTest extends TestCase
$this->assertEqualsNormalized($expected, ClassMapGenerator::createMap($directory));
}
/**
* @return array<array<string|array<string>>>
*/
public function getTestCreateMapTests()
{
if (PHP_VERSION_ID == 50303) {
@ -268,6 +271,12 @@ class ClassMapGeneratorTest extends TestCase
$this->assertEqualsNormalized($expected, $result);
}
/**
* @param array<class-string> $expected
* @param array<class-string> $actual
* @param string $message
* @return void
*/
protected function assertEqualsNormalized($expected, $actual, $message = '')
{
foreach ($expected as $ns => $path) {
@ -279,6 +288,7 @@ class ClassMapGeneratorTest extends TestCase
$this->assertEquals($expected, $actual, $message);
}
/** @return void */
private function checkIfFinderIsAvailable()
{
if (!class_exists('Symfony\\Component\\Finder\\Finder')) {