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:
parent
40c7a725e1
commit
832af78e28
2 changed files with 41 additions and 2 deletions
|
@ -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',
|
||||
),
|
||||
),
|
||||
));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue