Skip to content

Expand WorkerCommandLineFactory tests for the worker command string#10

Merged
TomasVotruba merged 1 commit into
mainfrom
tv-worker-command-line-tests
Jun 19, 2026
Merged

Expand WorkerCommandLineFactory tests for the worker command string#10
TomasVotruba merged 1 commit into
mainfrom
tv-worker-command-line-tests

Conversation

@TomasVotruba

Copy link
Copy Markdown
Member

Follow-up to #9. Locks down the exact worker command string built by WorkerCommandLineFactory::create().

Added cases

  • bool option true--flag, false → omitted
  • null option → omitted
  • memory-limit → assign form --memory-limit=-1
  • string option → escaped value --name 'value'
  • excluded framework globals (no-interaction, verbose, ansi, help, output-format) → omitted
  • multiple paths → each escaped
  • project config file → --config 'ecs.php' right after the worker command name

Verified

  • phpunit — 10 tests green
  • phpstan — no errors

Cover option mirroring (bool flags, null skip, memory-limit assign form,
escaped string values), excluded framework globals, multiple paths, and
the project config file position right after the worker command name.
@TomasVotruba TomasVotruba merged commit da54a6a into main Jun 19, 2026
6 checks passed
@TomasVotruba TomasVotruba deleted the tv-worker-command-line-tests branch June 19, 2026 23:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant