Codeception startup classes

I'm having problems using the Codeception autoloader to load some abstract test classes. The reason for the abstract class is to simulate the structure of the classes used in the application to reduce the amount of code needed to thoroughly test the application.

Suppose I have an abstract class for testing, say, “ AbstractRepositoryTester”, which is used only in the “repository” test suite (I like to allocate things for organizational purposes).

Each repository that I test that implements " RepositoryContract" will have a test that also extends " AbstractRepositoryTester" with some overridden abstract methods.

Now that this is done, the abstract class will not load during testing and must be loaded manually into the bootstrap file. There is also another abstraction that extends the vanilla code test class so that I can set several variables (namely for laracasts / testdummy).

Both classes will not be able to boot without manually writing to the _boostrap file. To add to this, a particular package boot file cannot load files or seemingly execute at all, so I have to put all the boot code for all the sets into a global file _bootstrap.

I also tried using the class autoload class \Codeception\Util\Autoload::using the " load" method , but it does not work.

I am currently using require_once globally _bootstrap, so finally to the question:

( ) , , ?

? TDD , ( Laracasts).

, , , , , , PHPUnit , , , . Codeception, , API Autoload::load

,

- Everon.

+4

All Articles