Re: Testing methods with parent call

2018-01-03 Thread Lehmann Markus
Hi Tomas, thank you for your answer. I also thought about this possibility, but had hoped that there would be an easier way. I have not written any tests yet and would now have to adjust each class of mine. If there is no other option then I will probably have to do it that way. Best regards Ma

Re: Testing methods with parent call

2018-01-03 Thread Tomas Kvietkauskas
Hello Markus, in short, its possible: move parent::method() to its own private function e.g. private function callParentSend() { parent::send(); } then call callParentSend() in send method .. $this->callParentSend(); .. then callParentSend() function can be mocked or ignored - Tomas 2018

Testing methods with parent call

2018-01-03 Thread Lehmann Markus
Hello everybody, First of all, I wish you all a happy new year. I'm having a testing problem and I hope you can help me with that since I have not found anything useful so far. I am currently writing my first tests and I do not know how to deal with the case if a method calls its parent method.