I am creating an API in Yii2 and have unit testing with Codeception working as expected. However I am unable to get API testing to work. I see that Codeception has API testing built-in but unsure how to get that working in Yii2.
I have run codecept bootstrap but it only built unit, functional and acceptance files/folders. There is no methods such as sendPost(), sendGet() etc to be found. Following examples in the documentation I thought I could run codecept generate:suite api to build the API part but still no good.
Does anyone have any suggestions on what I can try?
Thanks for the response. I have tried everything but maybe not in the right order. I expected the generate:suite to build tests/api/ApiGuy.php but it. However running the build afterwards did build tests/api/NoGuy.php which has the methods that I need.