public function testParamManagementMethodsCallWrappedMethods() { $this->wrapped->expects($this->at(0))->method('prependParams')->with(array('p'))->will($this->returnValue('prep')); $this->wrapped->expects($this->at(1))->method('appendParams')->with(array('a'))->will($this->returnValue('appe')); $this->wrapped->expects($this->at(2))->method('getPrependParams')->with()->will($this->returnValue(array('p'))); $this->wrapped->expects($this->at(3))->method('getAppendParams')->with()->will($this->returnValue(array('a'))); $this->assertSame('prep', $this->decorator->prependParams(array('p'))); $this->assertSame('appe', $this->decorator->appendParams(array('a'))); $this->assertSame(array('p'), $this->decorator->getPrependParams()); $this->assertSame(array('a'), $this->decorator->getAppendParams()); }