I am using Codeception to test 3 APIs:
- Write a post comment
- Write a reply to the comment
- Get all comments from a post
The first API returns the ID of the comment that was just inserted into DB. I want to pass the comment Id to the second test method.
In PHPUnit I would do that by returning the commentId from the first method and annotating the second method with @depends, but in Codeception @depends does not send the returned value from the first method.
Is there any way I could send the value without placing both tests in the same method?
I am just starting to use Codeception, so I might miss some valuable information.