Ejemplo n.º 1
0
 /**
  * Displays report or generates its files
  *
  * @param VcsStats_Report $report Report
  * @return void
  */
 public function render(VcsStats_Report $report)
 {
     VcsStats_Runner_Cli::displayMessage('Rendering report to text');
     foreach ($report->getSections() as $section) {
         foreach ($section->getElements() as $element) {
             switch (get_class($element)) {
                 case 'VcsStats_Report_Element_Table':
                     $this->renderTable($element);
                     break;
             }
         }
     }
 }
Ejemplo n.º 2
0
 public function testGetSections()
 {
     $report = new VcsStats_Report('Subversion', 'http://svn.example.com/repository/');
     $section1 = new VcsStats_Report_Section();
     $report->addSection($section1);
     $section2 = new VcsStats_Report_Section();
     $report->addSection($section2);
     $section3 = new VcsStats_Report_Section();
     $report->addSection($section3);
     $this->assertSame(array($section1, $section2, $section3), $report->getSections());
 }