public function testIsAssertions() { $rule = new Rule(array(1, 12), 'job1', null); $rule2 = new Rule(array(1), 'job1', null); $this->assertFalse($rule->isAssertion()); $this->assertTrue($rule2->isAssertion()); }
public function testIsAssertions() { $rule = new Rule(array(1, 12), Rule::RULE_JOB_INSTALL, null); $rule2 = new Rule(array(1), Rule::RULE_JOB_INSTALL, null); $this->assertFalse($rule->isAssertion()); $this->assertTrue($rule2->isAssertion()); }
/** * Alters watch chains for a rule. * * Next1/2 always points to the next rule that is watching the same package. * The watches array contains rules to start from for each package * */ private function addWatchesToRule(Rule $rule) { // skip simple assertions of the form (A) or (-A) if ($rule->isAssertion()) { return; } if (!isset($this->watches[$rule->watch1])) { $this->watches[$rule->watch1] = null; } $rule->next1 = $this->watches[$rule->watch1]; $this->watches[$rule->watch1] = $rule; if (!isset($this->watches[$rule->watch2])) { $this->watches[$rule->watch2] = null; } $rule->next2 = $this->watches[$rule->watch2]; $this->watches[$rule->watch2] = $rule; }
public function testIsAssertions() { $literal = $this->getLiteralMock(); $literal2 = $this->getLiteralMock(); $rule = new Rule(array($literal, $literal2), 'job1', null); $rule2 = new Rule(array($literal), 'job1', null); $this->assertFalse($rule->isAssertion()); $this->assertTrue($rule2->isAssertion()); }