Example #1
0
 /**
  * Test the mergeWith function
  *
  * @return void
  */
 public function testMergeWith()
 {
     $this->file = new File('/some/file/name.php', array($this->issues[0], $this->issues[1]));
     $otherFile = new File('/some/file/name.php', array($this->issues[2]));
     $this->file->mergeWith($otherFile);
     $this->assertEquals(2, $this->file->getErrorCount());
     $this->assertEquals(1, $this->file->getWarningCount());
     $this->assertEquals(array_values($this->issues), array_values($this->file->getIssues()));
 }
Example #2
0
 /**
  * Has the file any issues?
  *
  * @param File $file
  * @return boolean
  */
 public static function hasFileAnyIssues(File $file)
 {
     $issues = $file->getIssues();
     return !empty($issues);
 }