Search code examples
symfonycodeception

How can I run a test separately in codeception when it has another parent class?


I am using codeception for my symfony2 project. I want to run a functional test separately which depends on another class. Here's my code.

class CheckoutFlowTestCest extends CheckoutFlowBaseCest

and the error I am getting is:

Class CheckoutFlowBaseCest not found.

When I run the full functional test then there's no error.


Solution

  • I answered this question in the comment earlier.

    The solution is to require_once the file of the parent class.

    require_once __DIR__ . '/CheckoutFlowBaseCest.php';

    It is necessary, because Codeception tests are not autoloaded.