feat(lang): add neotest config for PHP tests (#5958)

## Description

Similar to some other languages (this closely follows the Go lang
extra), this adds neotest runners for the major PHP test runners:
PHPUnit and Pest.

Both work together, trying to use Pest if available and falling back to
PHPUnit which is a decent approach for the PHP ecosystem.

I read CONTRIBUTING.md which differs from the way the Go lang extra has
implemented a neotest adapters and opted to follow that instead. Ie.
adapters
have been added as dependencies instead of a separate spec with
`lazy=true`. Let me know if you want that changed.

## Checklist

- [x] I've read the
[CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md)
guidelines.
This commit is contained in:
Jarryd Tilbrook
2025-10-20 17:40:56 +08:00
committed by GitHub
parent 90f84e7e75
commit 9b077c7a8e

View File

@@ -83,4 +83,21 @@ return {
},
},
},
{
"nvim-neotest/neotest",
optional = true,
dependencies = {
"V13Axel/neotest-pest",
"olimorris/neotest-phpunit",
},
opts = {
adapters = {
"neotest-pest",
["neotest-phpunit"] = {
root_ignore_files = { "tests/Pest.php" },
},
},
},
},
}