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:
parent
b3077bc4bc
commit
62bb5b339b
2 changed files with 20 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue