olimorris / neotest-phpunit

🧪 Neotest adapter for PHPUnit
MIT License
33 stars 23 forks source link

Add support for relative phpunit executables. #6

Closed haringsrob closed 2 years ago

haringsrob commented 2 years ago

Took a bit of code from https://github.com/haydenmeade/neotest-jest regarding directory processing.

This pr adds that phpunit is used depending on the closest parent vendor folder.

So if you have a project with multiple vendors this will now run in the correct context.

fixes #5

olimorris commented 2 years ago

@haringsrob I've just pushed a new commit which puts this type of feature in your neotest config

haringsrob commented 2 years ago

Hey @olimorris, I realised I was still on my patch until today. So I gave it a try but this does not work for my case. I need to run the relative phpunit.

olimorris commented 2 years ago

@haringsrob - You should be able to embed your logic in the custom command. Can you open up an issue and share the code?

haringsrob commented 2 years ago

What I mean is, that for my case, it has to run from the subfolders directory.

So my vim root is /project/ and the package is in /project/package, the cwd needs to be /project/package for the tests to run.