コード例 #1
0
ファイル: FileTest.php プロジェクト: khiemnd-ait/cakephp
 /**
  * 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()));
 }
コード例 #2
0
ファイル: ViewAbstract.php プロジェクト: khiemnd-ait/cakephp
 /**
  * Has the file any issues?
  *
  * @param File $file
  * @return boolean
  */
 public static function hasFileAnyIssues(File $file)
 {
     $issues = $file->getIssues();
     return !empty($issues);
 }