public function testDelete() { $payPeriod = new HspPayPeriod(); $payPeriod->setId(1); $payPeriod->delete(); $payPeriods = HspPayPeriod::listPayPeriods(date('Y')); $this->assertTrue(is_array($payPeriods)); $this->assertEquals(0, count($payPeriods)); }
public static function listPayPeriods($year) { $payPeriods = HspPayPeriod::listPayPeriods($year); $path = "/templates/benefits/listPayPeriods.php"; $tmpOb[0] = $payPeriods; $tmpOb[1] = $year; $tmpOb[2] = new authorize($_SESSION['empID'], $_SESSION['isAdmin']); $template = new TemplateMerger($tmpOb, $path); $template->display(); }