Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

$GLOBALS['xoops']->path() and PHPUnit testing #1349

Open
mambax7 opened this issue May 1, 2023 · 0 comments
Open

$GLOBALS['xoops']->path() and PHPUnit testing #1349

mambax7 opened this issue May 1, 2023 · 0 comments

Comments

@mambax7
Copy link
Collaborator

mambax7 commented May 1, 2023

When testing with PHPUnit, this doesn't work (from \htdocs\kernel\config.php):

require_once $GLOBALS['xoops']->path('kernel/configoption.php');
require_once $GLOBALS['xoops']->path('kernel/configitem.php');

Changing it to this, made it work:

require_once __DIR__ . '/configoption.php';
require_once __DIR__ . '/configitem.php';

Should we change it everywhere to this? Or are the reason to not to do it, and is there a workaround for PHPUnit?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant