1
0
Fork 0
mirror of https://github.com/composer/composer synced 2025-05-09 00:22:53 +00:00

Revert converting 1.0.0 to ^1.0.

This commit is contained in:
nevvermind 2015-06-08 22:45:20 +01:00
parent 9fb2d4f2d6
commit 12c833864c
4 changed files with 10 additions and 51 deletions

View file

@ -515,18 +515,12 @@ class VersionParserTest extends \PHPUnit_Framework_TestCase
);
}
public function oldStylePluginApiVersions()
public function pluginApiVersions()
{
return array(
array('1.0'),
array('1.0.0'),
array('1.0.0.0'),
);
}
public function newStylePluginApiVersions()
{
return array(
array('1'),
array('=1.0.0'),
array('==1.0'),
@ -543,23 +537,9 @@ class VersionParserTest extends \PHPUnit_Framework_TestCase
}
/**
* @dataProvider oldStylePluginApiVersions
* @dataProvider pluginApiVersions
*/
public function testOldStylePluginApiVersionGetsConvertedIntoAnotherConstraintToKeepBc($apiVersion)
{
$parser = new VersionParser;
/** @var Link[] $links */
$links = $parser->parseLinks('Plugin', '9.9.9', '', array('composer-plugin-api' => $apiVersion));
$this->assertArrayHasKey('composer-plugin-api', $links);
$this->assertSame('^1.0', $links['composer-plugin-api']->getConstraint()->getPrettyString());
}
/**
* @dataProvider newStylePluginApiVersions
*/
public function testNewStylePluginApiVersionAreKeptAsDeclared($apiVersion)
public function testPluginApiVersionAreKeptAsDeclared($apiVersion)
{
$parser = new VersionParser;