1
0
Fork 0
mirror of https://github.com/pnx/neotest-phpunit synced 2026-06-16 03:54:55 +02:00

[Feature] Add Customizable Sail Project Path (#6)

* Add sail_project_path to config

* Use sail_project_path in init.lua

* Update README.md

---------

Co-authored-by: Ziyad Sfaxi <ziyadsfaxi@Ziyads-MacBook-Pro-2.local>
This commit is contained in:
Ziyad 2024-04-08 06:33:10 +03:30 committed by GitHub
parent 25501800b5
commit 86737ada67
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 6 additions and 1 deletions

View file

@ -15,6 +15,7 @@ local M = {
ignore_dirs = { "vendor", "node_modules" },
test_file_suffixes = { "Test.php" },
sail_executable = "vendor/bin/sail",
sail_project_path = "/var/www/html",
parallel = 0,
compact = false,
},

View file

@ -104,7 +104,7 @@ function NeotestAdapter.build_spec(args)
if config('sail_enabled') then
debug("Sail enabled, adjusting path")
path = "/var/www/html" .. string.sub(position.path, string.len(vim.loop.cwd() or "") + 1)
path = config('sail_project_path') .. string.sub(position.path, string.len(vim.loop.cwd() or "") + 1)
end
local command = vim.tbl_flatten({