sublime-phpunit icon indicating copy to clipboard operation
sublime-phpunit copied to clipboard

Leading path separator check failed under Windows

Open davisonja opened this issue 10 years ago • 1 comments

I'm using ST3 on Windows 7 and had some trouble with PHPUnit not picking up the files properly. I've ultimately traced it to the PhpunitCommand class with, for example,:

    # remove the folder from the configfile
    if configfile.startswith(folder):
        configfile = configfile[len(folder):]
        if configfile[0] == "/":
            configfile = configfile[1:]`

Which I replaced with

    # remove the folder from the configfile
    if configfile.startswith(folder):
        configfile = configfile[len(folder):]
        if configfile[0] == os.path.sep:
            configfile = configfile[1:]

which brought everything back into line. Am I the only one that's run into this? My phpunit.xml is buried under folders in the project, so it's not in the 'top folder', which I've seen people recommend...

davisonja avatar Nov 12 '15 01:11 davisonja

Hi,

I am using ST2 on Win7 with PHPUnit 5.2.6 and I confirm the issue.

The fix works fine for me too, thank you @davisonja

It should also be applied to:

# remove the folder from the testfile

Starli0n avatar Feb 17 '16 16:02 Starli0n