You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi AresAndy, I see you figured out a way to test it by yourself, which is great.
One could also change the variables $_SERVER["REQUEST_METHOD"] and $_SERVER["REQUEST_URI"] before starting the RestServer to make it will use a certain controller.
A better appoach, I think, would be to create a setRequest and setResponse method on RestServer so we could create it on demand on the tests.
As a side note, this is framework is probably outdated and lacking in comparison with modern alternatives like Slim .
I thought of that too, but after a first look at the code it seemed to me that in order to do unit testing one should do acceptance testing instead. I also noticed that this framework is quite out of date, but unfortunately I was given the task of maintain a web service written with restserver, and while I suggested to move on a more adequate framework I was heavily forbidden to do so, so I'll see if my slight modification allows one to do phpunit w/o having a server running below.
No description provided.
The text was updated successfully, but these errors were encountered: