public function testGetYearsAndPlans() { /* DB values are as follows * hsp_plan_id hsp_plan_year * 1 date('Y') * 3 date('Y') * 1 date('Y')+1 * 3 date('Y')+1 */ /* Expected array should be as follows * $both[0]['year'] = date('Y'); * $both[0]['plan'][0] = 1; * $both[0]['plan'][1] = 3; * $both[1]['year'] = date('Y')+1; * $both[1]['plan'][0] = 1; * $both[1]['plan'][1] = 3; */ $both = HspSummary::getYearsAndPlans(); $this->assertEquals(date('Y'), $both[0]['year']); $this->assertEquals(date('Y') + 1, $both[1]['year']); $this->assertEquals(1, $both[0]['plan'][0]); $this->assertEquals(3, $both[0]['plan'][1]); $this->assertEquals(1, $both[1]['plan'][0]); $this->assertEquals(3, $both[1]['plan'][1]); }