public function testGetYears() { $years = HspPayPeriod::getYears(); $expected = array(date('Y'), date('Y') + 1, date('Y') + 20); $this->assertEquals($expected, $years); }
public static function selectYearAndEmployee($action) { switch ($action) { case 'Expenditure': if ($_SESSION['isAdmin'] == 'No') { die('You are not authorized to view this page'); } $heading = 'HealthSavingsPlanUsedList'; $action = 'Hsp_Expenditures'; break; case 'Hsp_Summary': $heading = 'EmployeeHspSummary'; $action = 'Hsp_Summary'; break; case 'Hsp_Summary_Employee': $heading = 'PersonalHspSummary'; $action = 'Hsp_Summary_Employee&employeeId=' . $_SESSION['empID']; break; case 'Used_Select_Year': if ($_SESSION['isAdmin'] == 'No') { die('You are not authorized to view this page'); } $heading = 'HspUsed'; $action = 'Hsp_Used'; break; } $years = HspPayPeriod::getYears(); $path = "/templates/benefits/selectEmployeeAndYear.php"; $tmpOb[0] = $heading; $tmpOb[1] = $years; $tmpOb[2] = $action; $template = new TemplateMerger($tmpOb, $path); $template->display($action); }