You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You mean that classes have something like registerNamespaces? Then it's not a bug. Those namespaces are registered once the dispatcher will access this module - not earlier, i guess that's why you cant access classes in modules. You just need to register all classes seperately in unit tests.
@hunggau also it's normal behaviour, even in normal application, not unit testing those namespaces which you put to register in module configuration are available after dispatcher will enter this module and call this registerNamespaces method.
Hi all,
I use codeception to unit test my modular application with this command
php codecept.phar generate:test unit Example
Some class belong to a module can not auto load when I ran in test environment but in browser is ok.
I could be cause of lazy load or Phalcon\Mvc\Router\Group so my classes can not access in test environment.
Because I set the route group like this
$group = new Group([ 'module' => 'frontend', 'namespace' => 'Frontend\Controllers' ]);
here is my folder structure:
Anyone have solved this problem, please help me.
The text was updated successfully, but these errors were encountered: