![]() |
Undefined constant "CodeIgniter\Test\SUPPORTPATH" while testing at GitLab - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28) +--- Forum: CodeIgniter 4 Support (https://forum.codeigniter.com/forumdisplay.php?fid=30) +--- Thread: Undefined constant "CodeIgniter\Test\SUPPORTPATH" while testing at GitLab (/showthread.php?tid=88947) |
Undefined constant "CodeIgniter\Test\SUPPORTPATH" while testing at GitLab - shoorick - 12-06-2023 Hello, I made a test in web app using CodeIgtiter 4.4.3. It works locally (Debian GNU/Linux 11, PHP 8.2) when spawned from terminal or from VSCode but it terminated with errors when it spawned in GitLab CI/CD Code: $ php vendor/bin/phpunit --exclude-group Database tests PersonModelTest skipped if tests are executel locally with --exclude-group Database but here I see an error. tests/database/PersonModelTest.php is: PHP Code: <?php I tried to find solution here and in GutHub issues but without any success. How can I eliminate this error? Is there any documentation about CI4 and GitLab’s CI/CD? RE: Undefined constant "CodeIgniter\Test\SUPPORTPATH" while testing at GitLab - kenjis - 12-06-2023 Why SUPPORTPATH is not defined? It is defiined in https://github.com/codeigniter4/CodeIgniter4/blob/b367f2fb188af243e29578d4c6d940a249893b62/system/Test/bootstrap.php#L48 RE: Undefined constant "CodeIgniter\Test\SUPPORTPATH" while testing at GitLab - Scissors38th - 01-02-2024 I had the same issue and i found out that i had not set the "Test Frameworks" on my IDE settings. To do this on my project (using PhpStorm) i set the path with the value: Code: "[PATH_OF_MY_PROJECT]\htdocs\vendor\autoload.php" RE: Undefined constant "CodeIgniter\Test\SUPPORTPATH" while testing at GitLab - ozornick - 06-09-2024 I get the same error. To do this, you need to fix phpunit.xml.dist And set the right path bootstrap.php: Code: vendor/codeigniter4/framework/system/Test/bootstrap.php I think you need to add a comment to the file or documentation so that new users update their config RE: Undefined constant "CodeIgniter\Test\SUPPORTPATH" while testing at GitLab - kenjis - 06-09-2024 @ozornick That is a bug. I don't know why it was created. I created an issue on GitHub: https://github.com/codeigniter4/CodeIgniter4/issues/8946 |