Skip to content

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

@mambax7

Description

@mambax7

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions