Running phpunit in Vagrant
Closed this issue · 3 comments
Is running phpunit installed in a Vagrant box from the host machine supported?
I would guess not, but not sure exactly how you mean. The extension quite simply just runs phpunit from a path you specify in the config and passes some parameters like which function/class to test based on where your cursor is in the document currently open in VS Code. Maybe you can determine if what you intend to do would work based on that =)
It should ssh into the VM and run phpunit from there.
I'll try and let you know
Update: nope, it doesn't work but it would be great if it would
Yea it doesn't do that. Now it just executes phpunit as specified in the config and passes some parameters. But it might be possible for you to write a small batch file or something that you execute instead of phpunit.
That would do something like:
- Open ssh connection.
- Run phpunit with params that the extension provides (%* I think for all params in batch files).
Or if network mapped drives work for your VM it might be possible to just map the drive and then enter the mapped path to phpunit in the config.
Guess those could work but haven't tried it.