Пример #1
0
 public function testcalculateTotal()
 {
     //execute the method with data preset and verify it returns expected result
     $totals = array(10, 20, 30);
     $aor_Report = new AOR_Report();
     $this->assertEquals('', $aor_Report->calculateTotal('', $totals));
     $this->assertEquals(60, $aor_Report->calculateTotal('SUM', $totals));
     $this->assertEquals(3, $aor_Report->calculateTotal('COUNT', $totals));
     $this->assertEquals(20, $aor_Report->calculateTotal('AVG', $totals));
 }