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