I am building API Acceptance tests with Codeception.
I am familiar with Unit tests there and I used the setUp method in those classes for all logic required before running all the tests of the class.
However I didn't find anything like this for Acceptance Tests.
Notice that I am using the "Class" approach, not the procedural way.
So I have a class like this...
class ResourceCest {
public function _beforeSuite(ApiTester $I)
{
// Ideally this would work, but it doesn't.
}
public function _before(ApiTester $I)
{
$I->am('Api Tester');
}
public function somethingThatIWantToExecute(ApiTester $I)
{
$I->sendGet('something');
// etc
}
}
I can make a method like setUp, but then Codeception executes it as a test and thus outputting something when running the tests.