Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-12504

Unit Tests cannot be loaded from extension directories due to a particular path expected in PHPUnit_Runner_StandardTestSuiteLoader.php

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Blocker
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.4.0
    • Fix Version/s: 4.3.3
    • Component/s: Test suite
    • Labels:

      Description

      At the code sprint we found that we couldn't run phpunit tests with the scripts/phpunit or civix test command when the tests were in an extensions folder. We were getting an error "Class %s could not be found in %s. We tracked this down to PHPUnit_Runner_StandardTestSuiteLoader.php enforcing all tests to be in a global base_dir/tests/phpunit. The fix scans the include directories as well in an attempt to load the tests - this does work and lets the extension tests run from the civix test command.

      I will be sending a pull request with this issue #.

        Attachments

          Activity

            People

            • Assignee:
              timotten Tim Otten
              Reporter:
              lola_slade Lola Slade
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: