Пример #1
0
 public function testLiteralInverted()
 {
     $literal = new Literal($this->package, false);
     $inverted = $literal->inverted();
     $this->assertInstanceOf('\\Composer\\DependencyResolver\\Literal', $inverted);
     $this->assertTrue($inverted->isWanted());
     $this->assertSame($this->package, $inverted->getPackage());
     $this->assertFalse($literal->equals($inverted));
     $doubleInverted = $inverted->inverted();
     $this->assertInstanceOf('\\Composer\\DependencyResolver\\Literal', $doubleInverted);
     $this->assertFalse($doubleInverted->isWanted());
     $this->assertSame($this->package, $doubleInverted->getPackage());
     $this->assertTrue($literal->equals($doubleInverted));
 }
Пример #2
0
 protected function decisionsConflict(Literal $l)
 {
     return $this->decisionMap[$l->getPackageId()] > 0 && !$l->isWanted() || $this->decisionMap[$l->getPackageId()] < 0 && $l->isWanted();
 }