Skip to content

UnitTestBootstrap.php Not working with psr-4 #35

Description

@niko5

UnitTestBootstrap.php does not seem to be working with psr-4 since Flow 4 (I think).

The problem seems to be on line 55

$classesOrTests = ($classNameParts[$index + 1] === 'Tests' && isset($classNameParts[$index + 2]) && $classNameParts[$index + 2] === 'Unit') ? '/' : '/Classes/' . implode('/', $packageKeyParts) . '/';

which results in /Classes/PackagePart1/PackagePart2 being appended to PackagePart1.PackagePart2 and then can't load php class file as it doesn't exist.

If you amend line 55 to below - it seems to work
$classesOrTests = ($classNameParts[$index + 1] === 'Tests' && isset($classNameParts[$index + 2]) && $classNameParts[$index + 2] === 'Unit') ? '/' : '/Classes/';

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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