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

          [CRM-12504] Unit Tests cannot be loaded from extension directories due to a particular path expected in PHPUnit_Runner_StandardTestSuiteLoader.php
          Lola Slade added a comment -

          Hi Tim, I had created a pull request for the work we did at the sprint already: https://github.com/civicrm/civicrm-packages/pull/12

          Tim Otten added a comment -

          Thanks. I merged #12 into 4.3.

            People

            • Assignee:
              Tim Otten
              Reporter:
              Lola Slade

              Dates

              • Created:
                Updated:
                Resolved: