mirror of
https://github.com/composer/composer
synced 2025-05-09 00:22:53 +00:00
Validation warns if script description for nonexistent script is present
Fixes #7010
This commit is contained in:
parent
015927d0b0
commit
bbee0d7c6c
3 changed files with 33 additions and 0 deletions
|
@ -34,4 +34,15 @@ class ConfigValidatorTest extends TestCase
|
|||
$warnings
|
||||
);
|
||||
}
|
||||
|
||||
public function testConfigValidatorWarnsOnScriptDescriptionForNonexistentScript()
|
||||
{
|
||||
$configValidator = new ConfigValidator(new NullIO());
|
||||
list(, , $warnings) = $configValidator->validate(__DIR__ . '/Fixtures/composer_scripts-descriptions.json');
|
||||
|
||||
$this->assertContains(
|
||||
'Description for non-existent script "phpcsxxx" found in "scripts-descriptions"',
|
||||
$warnings
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue