function build($events = array()) { // comment the following line out if you want to call "$month->build($selectedDays);" below!! Otherwise you'll get strange results! parent::build(); foreach ($this->calendar->children as $i => $child) { $this->calendar->children[$i] =& new DiaryEvent($this->calendar->children[$i]); } if (count($events) > 0) { $this->setSelection($events); } return true; }
function testBuild() { $testArray = array('foo' => 'bar'); $this->mockcal->expectOnce('build', array($testArray)); $Decorator = new Calendar_Decorator($this->mockcal); $Decorator->build($testArray); }