1
0
Fork 0

Fixed RuleTest

pull/8850/head
Yanick Witschi 2020-05-06 17:30:44 +02:00 committed by Jordi Boggiano
parent 0955d38374
commit c7f10bdd90
No known key found for this signature in database
GPG Key ID: 7BBD42C429EC80BC
1 changed files with 4 additions and 1 deletions

View File

@ -103,7 +103,10 @@ class RuleTest extends TestCase
$repositorySetMock = $this->getMockBuilder('Composer\Repository\RepositorySet')->disableOriginalConstructor()->getMock();
$requestMock = $this->getMockBuilder('Composer\DependencyResolver\Request')->disableOriginalConstructor()->getMock();
$rule = new GenericRule(array($p1->getId(), -$p2->getId()), Rule::RULE_PACKAGE_REQUIRES, new Link('baz', 'foo', new EmptyConstraint(), 'relates to', '*'));
$emptyConstraint = new EmptyConstraint();
$emptyConstraint->setPrettyString('*');
$rule = new GenericRule(array($p1->getId(), -$p2->getId()), Rule::RULE_PACKAGE_REQUIRES, new Link('baz', 'foo', $emptyConstraint));
$this->assertEquals('baz 1.1 relates to foo * -> satisfiable by foo[2.1].', $rule->getPrettyString($repositorySetMock, $requestMock, $pool, false));
}