This sample covers the following scenario:
Every course has may chapters, while a chapter can belong to only one course. In the other hand every chapter has many videos while a video can belong to many chapters.
I will write the description below.
Getting an instance of the Laravel IOC container for testing.
ONLY IF THE FUNCTIONAL TEST IS INSIDE A LARAVEL PACKAGE YOU CAN DO THE FOLLOWING:
EXTEND THIS FROM YOUR PARENT TEST CLASS.
1 . remove the Laravel4 module from the functional.suite.yml
2. codeception build
3. inside the FunctionalHelper, do extend the \Codeception\Module\Laravel4
4. and there add your extra Laravel functions.