Example #1
0
 /**
  * Test getFileList with limit set
  *
  * @return  void
  */
 public function testGetFileListWithLimit()
 {
     $issueXML = new IssueXML();
     $xml = new DOMDocument('1.0', 'UTF-8');
     $xml->loadXML($this->testXml);
     $issueXML->addXMLFile($xml);
     $this->errorCrap = new ErrorCRAP($issueXML, array('threshold' => 30));
     $expected = array(new File('/test/file', array(new Issue('/test/file', 162, 162, 'CRAP', '100', 'Error'))), new File('/has/no/crap', array()));
     $actual = $this->errorCrap->getFileList();
     $this->assertEquals($expected, $actual);
 }
Example #2
0
 /**
  * (non-PHPDoc)
  * @see tests/cbAbstractTests#setUp()
  */
 protected function setUp()
 {
     parent::setUp();
     $issueXML = new IssueXML();
     $xml = new DOMDocument('1.0', 'UTF-8');
     $xml->loadXML($this->testXml);
     $issueXML->addXMLFile($xml);
     $this->errorCPD = new ErrorCPD($issueXML);
 }
 /**
  * (non-PHPDoc)
  * @see tests/cbAbstractTests#setUp()
  */
 protected function setUp()
 {
     parent::setUp();
     $issueXML = new IssueXML();
     $xml = new DOMDocument('1.0', 'UTF-8');
     $xml->validateOnParse = true;
     $xml->loadXML($this->testXml);
     $issueXML->addXMLFile($xml);
     $this->errorCheckstyle = new ErrorCheckstyle($issueXML);
 }