Code Monkey home page Code Monkey logo

Comments (7)

saltzmanjoelh avatar saltzmanjoelh commented on July 19, 2024 2

Try an absolute path. ENOENT means the file doesn't exist. In my case I had the wrong file extension.

from vscode-phpunit.

eugenlisov avatar eugenlisov commented on July 19, 2024 1

Any news on this issue? I'm running into the same problems as the others in this thread.
I've written an absolute path to phpunit.bat and it appears it's correct, as I now get this message, which is the content of the phpunit.bat file.

"@echo OFF
setlocal DISABLEDELAYEDEXPANSION
SET BIN_TARGET=%~dp0/../phpunit/phpunit/phpunit
php "%BIN_TARGET%" %*
"

I'm using Laravel.
I'm not sure what else I can try to figure it out.

I'd really like to get this working. The Test explorer is super cool, but tests can't run. I'm stuck with running them manually from Powershell.

Thanks!

from vscode-phpunit.

saltzmanjoelh avatar saltzmanjoelh commented on July 19, 2024

I had the same issue. For me I opened in vscode

Settings -> Extensions -> PHPUnit Configuration

About 8 settings down there is "Phpunit: Phpunit" Path to phpunit.

Setting this fixed my issue.

from vscode-phpunit.

programmende avatar programmende commented on July 19, 2024

Dosn't work for me.

I have set the following setting:
"phpunit.phpunit": "${workspaceFolder}\vendor\bin\phpunit",

I use Laravel Framework and the phpunit executable exists in bin/phpunit

This is the message in PHPUnit LanguageServer window now:
spawn ${workspaceFolder}\vendor\bin\phpunit ENOENT

from vscode-phpunit.

recca0120 avatar recca0120 commented on July 19, 2024

I'm rewriting this project now, it will fix this issue at next version

from vscode-phpunit.

MorenoGentili avatar MorenoGentili commented on July 19, 2024

Thanks @recca0120 do you have any ETA about this?
At least a suggestion on how I should set the phpunit.phpunit value since it seems to be broken. My vendor directory is in app/vendor and I couldn't set a proper relative path. None of these worked.

"phpunit.phpunit": "app/vendor/bin/phpunit" <-- It should search for phpunit OR phpunit.bat
"phpunit.phpunit": "app/vendor/bin/phpunit.bat"
"phpunit.phpunit": "${workspaceFolder}/app/vendor/bin/phpunit"
"phpunit.phpunit": "${workspaceFolder}/app/vendor/bin/phpunit.bat"
"phpunit.phpunit": "${workspaceFolder}\\app\\vendor\\bin\\phpunit"
"phpunit.phpunit": "${workspaceFolder}\\app\\vendor\\bin\\phpunit.bat"

I always get:

spawn \${workspaceFolder}\app\vendor\bin\phpunit.bat ENOENT

Please notice it prepends a \ and it doesn't seem to resolve ${workspaceFolder}.

For now I'm using an absolute path but I want to really really really want to avoid that. It breaks multiplatform compatibility and - heck - it even breaks my PC at home if I ever wanted to commit the .vscode directory.

"phpunit.phpunit": "C:\\Users\\User\\my-project\\app\\vendor\\bin\\phpunit.bat",

Thanks.

PS. It think this is a duplicate of #39

from vscode-phpunit.

recca0120 avatar recca0120 commented on July 19, 2024

try version 3.0

from vscode-phpunit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.