Skip to content

WP_Env: tests-cli phpunit executable file not found in $PATH: unknown #51686

@JUVOJustin

Description

@JUVOJustin

Description

I want to run my phpunit tests within wp-env tests-cli container as it is suggested in the documentation. However, when running wp-env run tests-cli wp-env run tests-cli --env-cwd=wp-content/plugins/juvo-session-manager phpunit i get the following error message:

ℹ Starting 'wp-env run tests-cli phpunit' on the tests-cli container. 

OCI runtime exec failed: exec failed: unable to start container process: exec: "wp-env": executable file not found in $PATH: unknown
✖ Command failed with exit code 126
Command failed with exit code 126

Same command with composer does work. Also, when starting bash inside the container, i see that phpunit is generally available.

Step-by-step reproduction instructions

  1. Go into plugin folder
  2. Star with npm run wp-env start
  3. Run wp-env run tests-cli --env-cwd=wp-content/plugins/juvo-session-manager phpunit

Screenshots, screen recording, code snippet

No response

Environment info

No response

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

Metadata

Metadata

Assignees

Labels

Needs TestingNeeds further testing to be confirmed.[Tool] Env/packages/env[Type] BugAn existing feature does not function as intended

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions