Welcome Guest, Not a member yet? Register   Sign In
[4.4] Tests fail
#3

(This post was last modified: 05-02-2023, 02:07 AM by iRedds.)

Strange behavior.
On Windows, there are errors in the tests.
On a virtual machine in Ubuntu, there are no errors in the tests.

2All: Can someone test on Windows (no WSL)?

OK. I found. The problem was in the file paths.
PHP Code:
// \CodeIgniter\Router\RouteCollection::discoverRoutes()
            $files $this->fileLocator->search('Config/Routes.php');

            foreach ($files as $file) {
                // Don't include our main file again...
                if (in_array($file$this->routeFilestrue)) {
                    continue;
                }

                include $file;
            }
/*
$files
array(2) {
  [0]=>
  string(59) "D:\1\CodeIgniter4\app\Config\Routes.php"
  [1]=>
  string(70) "D:\1\CodeIgniter4\tests\_support\Config\Routes.php"
}

$this->routeFiles
array(1) {
  [0]=>
  string(59) "D:\1\CodeIgniter4\app\Config/Routes.php"
}
*/ 



Most tests that depend on paths fail on Windows.
Reply


Messages In This Thread
[4.4] Tests fail - by iRedds - 05-01-2023, 04:24 PM
RE: [4.4] Tests fail - by kenjis - 05-01-2023, 05:26 PM
RE: [4.4] Tests fail - by iRedds - 05-01-2023, 06:41 PM
RE: [4.4] Tests fail - by brabus - 07-12-2023, 05:30 PM
RE: [4.4] Tests fail - by kenjis - 07-12-2023, 06:26 PM
RE: [4.4] Tests fail - by InsiteFX - 07-12-2023, 10:50 PM



Theme © iAndrew 2016 - Forum software by © MyBB