mirror of
https://github.com/composer/composer
synced 2025-05-09 16:42:57 +00:00
Add types to Config
tests (#10234)
This commit is contained in:
parent
974c471ad8
commit
467fe3c1be
1 changed files with 26 additions and 4 deletions
|
@ -24,6 +24,11 @@ class JsonConfigSourceTest extends TestCase
|
||||||
/** @var string */
|
/** @var string */
|
||||||
private $workingDir;
|
private $workingDir;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param string $name
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
protected function fixturePath($name)
|
protected function fixturePath($name)
|
||||||
{
|
{
|
||||||
return __DIR__.'/Fixtures/'.$name;
|
return __DIR__.'/Fixtures/'.$name;
|
||||||
|
@ -143,6 +148,17 @@ class JsonConfigSourceTest extends TestCase
|
||||||
$this->assertFileEquals($compareAgainst, $composerJson);
|
$this->assertFileEquals($compareAgainst, $composerJson);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param string $type
|
||||||
|
* @param string $name
|
||||||
|
* @param string $value
|
||||||
|
* @param string $fixtureBasename
|
||||||
|
* @param string $before
|
||||||
|
*
|
||||||
|
* @return string[]
|
||||||
|
*
|
||||||
|
* @phpstan-return array{string, string, string, string, string}
|
||||||
|
*/
|
||||||
protected function addLinkDataArguments($type, $name, $value, $fixtureBasename, $before)
|
protected function addLinkDataArguments($type, $name, $value, $fixtureBasename, $before)
|
||||||
{
|
{
|
||||||
return array(
|
return array(
|
||||||
|
@ -156,8 +172,6 @@ class JsonConfigSourceTest extends TestCase
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Provide data for testAddLink
|
* Provide data for testAddLink
|
||||||
*
|
|
||||||
* @return array
|
|
||||||
*/
|
*/
|
||||||
public function provideAddLinkData()
|
public function provideAddLinkData()
|
||||||
{
|
{
|
||||||
|
@ -192,6 +206,16 @@ class JsonConfigSourceTest extends TestCase
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param string $type
|
||||||
|
* @param string $name
|
||||||
|
* @param string $fixtureBasename
|
||||||
|
* @param string|null $after
|
||||||
|
*
|
||||||
|
* @return string[]
|
||||||
|
*
|
||||||
|
* @phpstan-return array{string, string, string, string}
|
||||||
|
*/
|
||||||
protected function removeLinkDataArguments($type, $name, $fixtureBasename, $after = null)
|
protected function removeLinkDataArguments($type, $name, $fixtureBasename, $after = null)
|
||||||
{
|
{
|
||||||
return array(
|
return array(
|
||||||
|
@ -204,8 +228,6 @@ class JsonConfigSourceTest extends TestCase
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Provide data for testRemoveLink
|
* Provide data for testRemoveLink
|
||||||
*
|
|
||||||
* @return array
|
|
||||||
*/
|
*/
|
||||||
public function provideRemoveLinkData()
|
public function provideRemoveLinkData()
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue