function testToArray() { $this->mockcal->expectOnce('toArray', array(12345)); $testArray = array('foo' => 'bar'); $this->mockcal->setReturnValue('toArray', $testArray); $Decorator = new Calendar_Decorator($this->mockcal); $this->assertEqual($testArray, $Decorator->toArray(12345)); }