Exemplo n.º 1
0
 public function testToString()
 {
     $repo = new ArrayRepository();
     $repo->addPackage($p1 = $this->getPackage('foo', '2.1'));
     $repo->addPackage($p2 = $this->getPackage('baz', '1.1'));
     $this->pool->addRepository($repo);
     $rule = new Rule($this->pool, array($p1->getId(), -$p2->getId()), 'job1', null);
     $this->assertEquals('(-baz-1.1.0.0|+foo-2.1.0.0)', $rule->__toString());
 }
Exemplo n.º 2
0
 public function testToString()
 {
     $literal = new Literal($this->getPackage('foo', '2.1'), true);
     $literal2 = new Literal($this->getPackage('baz', '1.1'), false);
     $rule = new Rule(array($literal, $literal2), 'job1', null);
     $this->assertEquals('(-baz-1.1.0.0|+foo-2.1.0.0)', $rule->__toString());
 }