vim-ultest icon indicating copy to clipboard operation
vim-ultest copied to clipboard

Feature/phpunit

Open megawubs opened this issue 2 years ago • 3 comments

As mentioned in https://github.com/rcarriga/vim-ultest/issues/94 there is no parser for phpunit. This PR adds one.

My python is quite rusty. I've found out most of the stuff that needed to be done by looking around in the code. Only one thing that's unclear to me is that the namespaces array of the ParseResult is empty, while i've added a capturing group for it in the regex. I might have overlooked something. @rcarriga can you help out with this?

megawubs avatar Jan 19 '22 19:01 megawubs

Thanks for the PR :grin: Just the one comment/question, looks great!

rcarriga avatar Jan 19 '22 20:01 rcarriga

@rcarriga What do you think so far?

megawubs avatar Jan 24 '22 21:01 megawubs

Actually just looking at the vim-test code, it seems like vim-test doesn't use namespaces for phpunit so actually I believe the namespaces shouldn't be added. Otherwise the results won't be matched to the tests. So then the pattern should be

    "php#phpunit": OutputPatterns(
        failed_test=r"\s*\d\) .*::(?P<name>.*)",
    ),

I don't have a php environment to use so I'll have to ask you to verify,

rcarriga avatar Jan 31 '22 20:01 rcarriga