1
0
Fork 0

Add tests for wrong package name.

pull/8013/head
Patrick Reimers 2019-03-05 10:53:43 +01:00
parent 8ae8d131d5
commit dd1e80a38f
No known key found for this signature in database
GPG Key ID: 6A47322A0E80596C
1 changed files with 24 additions and 0 deletions

View File

@ -298,6 +298,30 @@ class ValidatingArrayLoaderTest extends TestCase
'homepage : invalid value (foo:bar), must be an http/https URL',
),
),
array(
array(
'name' => 'foo/bar.json',
),
array(
'Deprecation warning: Your package name foo/bar.json is invalid, package names can not end in .json, consider renaming it or perhaps using a -json suffix instead. Make sure you fix this as Composer 2.0 will error.',
),
),
array(
array(
'name' => 'com1/foo',
),
array(
'Deprecation warning: Your package name com1/foo is reserved, package and vendor names can not match any of: nul, con, prn, aux, com1, com2, com3, com4, com5, com6, com7, com8, com9, lpt1, lpt2, lpt3, lpt4, lpt5, lpt6, lpt7, lpt8, lpt9. Make sure you fix this as Composer 2.0 will error.',
),
),
array(
array(
'name' => 'Foo/Bar',
),
array(
'Deprecation warning: Your package name Foo/Bar is invalid, it should not contain uppercase characters. We suggest using foo/bar instead. Make sure you fix this as Composer 2.0 will error.',
),
),
array(
array(
'name' => 'foo/bar',