Exemplo n.º 1
0
 public function testParseDBAs()
 {
     $CMock = $this->getMock('Connective', array(), array('Conjunction'));
     $CPMock = $this->getMock('ConnectiveParser', array('parseConnective'), array($this->ERXQuery, $this->ERXQueryXPath));
     $CPMock->expects($this->exactly(44))->method("parseConnective")->will($this->returnValue($CMock));
     $DBAP = new DBAParser($this->ERXQuery, $this->ERXQueryXPath, $CPMock);
     $this->assertEquals(44, $DBAP->parseDBAs());
 }
Exemplo n.º 2
0
 function parseRules()
 {
     $rules = array();
     $CP = new ConnectiveParser($this->ER, $this->XPath);
     $BBAP = new BBAParser($this->ER, $this->XPath);
     $BBAP->parseBBAs();
     $DBAP = new DBAParser($this->ER, $this->XPath, $CP);
     $DBAP->parseDBAs();
     $TSR = new TaskSettingRule($this->XPath->evaluate('//TaskSetting')->item(0), $this->ER, $this->attributes, $this->interestMeasures, $DBAP, $BBAP);
     try {
         $TSR->parse($DBAP, $BBAP);
         array_push($rules, $TSR);
     } catch (InvalidRuleException $e) {
     }
     return $rules;
 }
Exemplo n.º 3
0
 function parseRules()
 {
     $rules = array();
     $CP = new ConnectiveParser($this->ER, $this->XPath);
     $BBAP = new BBAParser($this->ER, $this->XPath);
     $BBAP->parseBBAs();
     $DBAP = new DBAParser($this->ER, $this->XPath, $CP);
     $DBAP->parseDBAs();
     foreach ($this->XPath->evaluate('//AssociationRule') as $iAR) {
         $AR = new AssociationRule($iAR, $this->ER, $this->attributes, $this->interestMeasures, $DBAP, $BBAP);
         try {
             $AR->parse($DBAP, $BBAP);
             array_push($rules, $AR);
         } catch (InvalidRuleException $e) {
         }
     }
     return $rules;
 }