sublime-phpunit
sublime-phpunit copied to clipboard
Leading path separator check failed under Windows
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...
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