1
0
Fork 0
mirror of https://github.com/composer/composer synced 2025-05-08 16:17:37 +00:00

Add types to Package tests (#10245)

This commit is contained in:
Martin Herndl 2021-11-01 21:44:12 +01:00 committed by GitHub
parent a155c076db
commit bcbd8fdb61
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 159 additions and 21 deletions

View file

@ -134,6 +134,11 @@ class ArrayLoaderTest extends TestCase
return array(array($validConfig));
}
/**
* @param array<string, mixed> $config
*
* @return array<string, mixed>
*/
protected function fixConfigWhenLoadConfigIsFalse($config)
{
$expectedConfig = $config;
@ -147,6 +152,8 @@ class ArrayLoaderTest extends TestCase
* allows require-dev libraries to have transport options included.
*
* @dataProvider parseDumpProvider
*
* @param array<string, mixed> $config
*/
public function testParseDumpDefaultLoadConfig($config)
{
@ -158,6 +165,8 @@ class ArrayLoaderTest extends TestCase
/**
* @dataProvider parseDumpProvider
*
* @param array<string, mixed> $config
*/
public function testParseDumpTrueLoadConfig($config)
{
@ -170,6 +179,8 @@ class ArrayLoaderTest extends TestCase
/**
* @dataProvider parseDumpProvider
*
* @param array<string, mixed> $config
*/
public function testParseDumpFalseLoadConfig($config)
{
@ -262,7 +273,7 @@ class ArrayLoaderTest extends TestCase
$this->assertFalse($package->isAbandoned());
}
public function pluginApiVersions()
public function providePluginApiVersions()
{
return array(
array('1.0'),
@ -284,7 +295,9 @@ class ArrayLoaderTest extends TestCase
}
/**
* @dataProvider pluginApiVersions
* @dataProvider providePluginApiVersions
*
* @param string $apiVersion
*/
public function testPluginApiVersionAreKeptAsDeclared($apiVersion)
{