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

Add basic source/dist validation

This commit is contained in:
Jordi Boggiano 2021-04-28 21:53:09 +02:00
parent 40c7a725e1
commit 832af78e28
No known key found for this signature in database
GPG key ID: 7BBD42C429EC80BC
2 changed files with 41 additions and 2 deletions

View file

@ -322,6 +322,19 @@ class ValidatingArrayLoaderTest extends TestCase
'transport-options : should be an array, string given',
),
),
array(
array(
'name' => 'foo/bar',
'source' => array('url' => '--foo', 'reference' => ' --bar', 'type' => 'baz'),
'dist' => array('url' => ' --foox', 'reference' => '--barx', 'type' => 'baz'),
),
array(
'dist.reference : must not start with a "-", "--barx" given',
'dist.url : must not start with a "-", " --foox" given',
'source.reference : must not start with a "-", " --bar" given',
'source.url : must not start with a "-", "--foo" given',
),
),
));
}