mirror of
https://github.com/composer/composer
synced 2025-05-09 00:22:53 +00:00
ValidatingArrayLoader: only validate source/dist properties if they are set (#10658)
This commit is contained in:
parent
61be158040
commit
1daafb817d
2 changed files with 17 additions and 3 deletions
|
@ -417,6 +417,20 @@ class ValidatingArrayLoaderTest extends TestCase
|
|||
'require.foo/Bar : a package cannot set a require on itself',
|
||||
),
|
||||
),
|
||||
array(
|
||||
array(
|
||||
'name' => 'foo/bar',
|
||||
'source' => array('url' => 1),
|
||||
'dist' => array('url' => null),
|
||||
),
|
||||
array(
|
||||
'source.type : must be present',
|
||||
'source.url : should be a string, integer given',
|
||||
'source.reference : must be present',
|
||||
'dist.type : must be present',
|
||||
'dist.url : must be present',
|
||||
),
|
||||
),
|
||||
));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue