I was wondering - is there a tool that will look at my PHP code and automatically generate a PHPUnit test for it? Or is there such a tool for any other language that I could port to PHP?
I'm not talking about creating a skeleton. I thought it would be possible for the tool to look at tokenized PHP and determine code paths through a method, and then automatically generate a test for each code path, creating mocks and setting up βpendingβ calls as needed.
Even if there is no tool that currently does this, can such a task be feasible or am I missing something?
source share