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

Bootstrap: Use root_path with __DIR__ to get the correct path

    XMLWordPrintable

Details

    • Task
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Invalid
    • 3.1.4-RC1
    • None
    • Test Suite
    • None
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: