Codeception/Codeception — pull request #812 by ayastreb (2014-01-14 16:17:52+00:00)
Title: Changed getClassesFromFile() method to use tokenizer for reading classes...

When running multiple environments, getClassesFromFile() method in SuiteManager is called once for each env.
See \Codeception\Codecept::runSuite() - for each env new SuiteManager is created and tests are loaded.
Make sure that calling getClassesFromFile() multiple times will always return the same classes.

Using get_declared_classes() doesn't work, because when 2nd environment is running the file has already been included in previous env run, and $loaded_classes == $extra_loaded_classes, resulting in empty classes list and no tests added for 2nd environment.