mirror of
https://github.com/composer/composer
synced 2025-05-08 16:17:37 +00:00
Validate autoload options are of a supported type
Checks to ensure that the autoload options are one of the three supported autoload types. closes #952
This commit is contained in:
parent
028d95db63
commit
ffd45b7678
2 changed files with 31 additions and 1 deletions
|
@ -234,6 +234,28 @@ class ValidatingArrayLoaderTest extends \PHPUnit_Framework_TestCase
|
|||
'support.source : invalid value, must be a string',
|
||||
)
|
||||
),
|
||||
array(
|
||||
array(
|
||||
'name' => 'foo/bar',
|
||||
'autoload' => 'strings',
|
||||
),
|
||||
array(
|
||||
'autoload : should be an array, string given'
|
||||
)
|
||||
),
|
||||
array(
|
||||
array(
|
||||
'name' => 'foo/bar',
|
||||
'autoload' => array(
|
||||
'psr0' => array(
|
||||
'foo' => 'src',
|
||||
),
|
||||
),
|
||||
),
|
||||
array(
|
||||
'autoload : invalid value (psr0), must be one of psr-0, classmap, files'
|
||||
)
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue