mirror of
https://github.com/composer/composer
synced 2025-05-09 00:22:53 +00:00
ArrayLoader/ValidatingArrayLoader: handle non-string values for version/version_normalized (#10470)
Co-authored-by: Jordi Boggiano <j.boggiano@seld.be>
This commit is contained in:
parent
6b8f1409e4
commit
3b4afaa9e3
3 changed files with 28 additions and 7 deletions
|
@ -314,4 +314,15 @@ class ArrayLoaderTest extends TestCase
|
|||
$this->assertArrayHasKey('composer-plugin-api', $links);
|
||||
$this->assertSame('6.6.6', $links['composer-plugin-api']->getConstraint()->getPrettyString());
|
||||
}
|
||||
|
||||
public function testNoneStringVersion()
|
||||
{
|
||||
$config = array(
|
||||
'name' => 'acme/package',
|
||||
'version' => 1,
|
||||
);
|
||||
|
||||
$package = $this->loader->load($config);
|
||||
$this->assertSame('1', $package->getPrettyVersion());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue