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)); }
protected function decisionsConflict(Literal $l) { return $this->decisionMap[$l->getPackageId()] > 0 && !$l->isWanted() || $this->decisionMap[$l->getPackageId()] < 0 && $l->isWanted(); }