I'm writing the API test suite for a project I'm currently working on.
I can successfully run the suite using
codecept run api
and all the tests are passing successfully, but whenever I try running a single test using
codecept run api Tests\Users\Get
the following error is thrown:
PHP Fatal error: Class 'Tests\ApiCest' not found in /Users/Username/Programming/PHP/Project/tests/api/Tests/Users/GetCest.php on line 12
This is the folder structure I'm using:
ApiCest.php is only used to quickly bootstrap the other tests. Here is its content:
* This class is extended by the API tests.
public function _before(ApiTester $I)
public function _after(ApiTester $I)
// All API responses must be in a JSON format.
And this is how it's used in the
* Tests for the GET /users API endpoint.
class GetCest extends ApiCest
// Tests methods are here but omitted