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

Feature request: Allow configuration of php code lens file pattern

Open BladeMF opened this issue 1 year ago • 3 comments

It will be useful to be able to configure where code lens is enabled in php files. Not all folders with tests start with the text test. They may end with tests as well or have some other naming rule.

I can PR this.

BladeMF avatar Jan 18 '24 10:01 BladeMF

Hi, my understanding is that phpunit naming convention requires test methods to start with test* or that the test attribute in a comment is used to be identified as a test.

If that's the case then I dont think we should add custom naming rules that arent officially supported in phpunit.

I found this in the docs here https://docs.phpunit.de/en/10.5/writing-tests-for-phpunit.html

elonmallin avatar Jan 18 '24 18:01 elonmallin

You are correct, but the filter I am talking about is the directory filter, not the method filter. Code lens is not activated unless the directory name starts with test, which should be configurable.

BladeMF avatar Jan 19 '24 08:01 BladeMF

Ah I see, please make a PR if you want :)

elonmallin avatar Jan 19 '24 12:01 elonmallin