public function testLineCount()
 {
     $error_class = $this->getMock('ErrorFactory', array('fromLine'));
     $error_class->expects($this->any())->method('fromLine');
     $analyzer = new JenkinsLogAnalyzer(fopen("data://text/plain," . urlencode("1\n2\n3"), 'r'), $error_class);
     $analyzer->process();
     $this->assertEquals(3, $analyzer->line_count);
 }
示例#2
0
 private function processLogFile($log_filename)
 {
     $log_file = fopen($log_filename, 'r');
     $analyzer = new JenkinsLogAnalyzer($log_file);
     $analyzer->process();
     fclose($log_file);
     $generator = new JenkinsLogAnalyzer_HtmlGenerator($log_filename, $analyzer);
     print $generator->generateReport();
 }