I have an API written in PHP, which works with nodejs sockets. I want to test this project with PHPUnit or codeception. How to do it? What is the best way to do it? I didn't found any documentation.
Asked
Active
Viewed 216 times
1 Answers
0
PHPUnit is a unit testing framework, it doesn't really care what are you testing with it as far as it's independent blocks of PHP code, i.e., whether it's API or not, PHPUnit doesn't care. Documentation and how to get started is available here. Besides the official docs and tutorials there are gadzillions of other great resources, like this one. Codeception has a dedicated section in the docs on how to test APIs.
If this is the beginning of your testing life, you will find it much easier following the general documentation from bottom to the top and then looking at more complex stuff, like testing APIs, etc. Be ready, as this is likely to take some weeks before you can get the head around with both frameworks.

Ian Bytchek
- 8,804
- 6
- 46
- 72