We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

codecept test phalcon router

my app/config/router.php

<?php

$router = $di->get("router");

foreach ($application->getModules() as $key => $module) { $namespace = str_replace('Module','Controllers', $module["className"]); $router->add('/'.$key.'/:params', [ 'namespace' => $namespace, 'module' => $key, 'controller' => 'index', 'action' => 'index', 'params' => 1 ])->setName($key); $router->add('/'.$key.'/:controller/:params', [ 'namespace' => $namespace, 'module' => $key, 'controller' => 1, 'action' => 'index', 'params' => 2 ]); $router->add('/'.$key.'/:controller/:action/:params', [ 'namespace' => $namespace, 'module' => $key, 'controller' => 1, 'action' => 2, 'params' => 3 ]); }

$di->set("router", $router);

my codecept test function

public function openIndexInfoByRoute(FunctionalTester $I)
{
    $I->amOnRoute('frontend.index.info');
    $I->see('phpinfo');
}

error info

[Phalcon\Mvc\Url\Exception] Cannot obtain a route using the name 'frontend.index.info'

Never used codecept, but if you're testing URLs they should separated by slashes: frontend/index/info