1
0
Fork 0
mirror of https://github.com/composer/composer synced 2025-05-10 09:02:59 +00:00

Allow parsing of stability modifiers combined with multi-constraints

This commit is contained in:
Jordi Boggiano 2012-10-05 19:05:39 +02:00
parent b3077bc4bc
commit 62bb5b339b
2 changed files with 20 additions and 0 deletions

View file

@ -249,6 +249,15 @@ class VersionParserTest extends \PHPUnit_Framework_TestCase
$this->assertSame((string) $multi, (string) $parser->parseConstraints('>2.0,<=3.0'));
}
public function testParseConstraintsMultiWithStabilities()
{
$parser = new VersionParser;
$first = new VersionConstraint('>', '2.0.0.0');
$second = new VersionConstraint('<=', '3.0.0.0-dev');
$multi = new MultiConstraint(array($first, $second));
$this->assertSame((string) $multi, (string) $parser->parseConstraints('>2.0@stable,<=3.0@dev'));
}
/**
* @dataProvider failingConstraints
* @expectedException UnexpectedValueException