/** * Override the prevMonth method to format the output */ function prevMonth() { $prevStamp = parent::prevMonth(TRUE); // Build the URL for the previous month return $_SERVER['PHP_SELF'] . '?y=' . date('Y', $prevStamp) . '&m=' . date('n', $prevStamp) . '&d=' . date('j', $prevStamp); }
function testPrevMonth() { $this->mockcal->expectOnce('prevMonth', array('int')); $Decorator = new Calendar_Decorator($this->mockcal); $this->assertEqual(9, $Decorator->prevMonth()); }