예제 #1
0
 public function testToString()
 {
     $repo = new ArrayRepository();
     $repo->addPackage($p = $this->getPackage('foo', '2.1'));
     $this->pool->addRepository($repo);
     $ruleSet = new RuleSet();
     $literal = $p->getId();
     $rule = new Rule($this->pool, array($literal), 'job1', null);
     $ruleSet->add($rule, RuleSet::TYPE_JOB);
     $this->assertContains('JOB     : (+foo-2.1.0.0)', $ruleSet->__toString());
 }
예제 #2
0
 public function testPrettyString()
 {
     $repo = new ArrayRepository();
     $repo->addPackage($p = $this->getPackage('foo', '2.1'));
     $this->pool->addRepository($repo);
     $ruleSet = new RuleSet();
     $literal = $p->getId();
     $rule = new Rule(array($literal), Rule::RULE_JOB_INSTALL, null);
     $ruleSet->add($rule, RuleSet::TYPE_JOB);
     $this->assertContains('JOB     : Install command rule (install foo 2.1)', $ruleSet->getPrettyString($this->pool));
 }
예제 #3
0
 public function testToString()
 {
     $ruleSet = new RuleSet();
     $literal = new Literal($this->getPackage('foo', '2.1'), true);
     $rule = new Rule(array($literal), 'job1', null);
     $ruleSet->add($rule, RuleSet::TYPE_FEATURE);
     $this->assertContains('FEATURE : (+foo-2.1.0.0)', $ruleSet->__toString());
 }