Uploaded image for project: 'phpBB3'
  1. phpBB3
  2. PHPBB3-13761

Bootstrap: Use root_path with __DIR__ to get the correct path

    Details

    • Type: Task
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Invalid
    • Affects Version/s: 3.1.4-RC1
    • Fix Version/s: None
    • Component/s: Test Suite
    • Labels:
      None
    • Environment:
      Windows 8.1, Visual Studio 2013 + PHPTools for Visual Studio
      PHP 5.4.24, MySQL 5.5, Chrome 39.0.2171.71 m

      Description

      When using PHPUnit tests with some IDE, there can be error with the tests suites.

      My IDE for example has its own PHPUnit integrated. When I execute the phpunit.xml.dist then, it loads the boostrap, finds line
      $phpbb_root_path = '/phpBB/';
      and load the require_once() files after that from the wrong folder, cause they are relative to the file wich is executed first.

      My suggested solution is using
      $phpbb_root_path = _DIR_ . '/../phpBB/';
      _DIR_ is shortand for the directory where the current file (so bootstrap.php) is placed.

        Attachments

          Activity

            People

            • Assignee:
              Marc Marc
              Reporter:
              Wolfsblvt Wolfsblvt [X] (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: