Skip to content

[Console] Document the result-based testing API for CommandTester#22007

Open
lacatoire wants to merge 1 commit intosymfony:8.1from
lacatoire:docs/console-result-based-testing-api
Open

[Console] Document the result-based testing API for CommandTester#22007
lacatoire wants to merge 1 commit intosymfony:8.1from
lacatoire:docs/console-result-based-testing-api

Conversation

@lacatoire
Copy link
Contributor

Fixes #22004

This documents the new result-based testing API for CommandTester introduced in Symfony 8.1 (symfony/symfony#61494):

  • The CommandTester::run() method that returns an ExecutionResult object
  • The ExecutionResult class with access to stdout, stderr and combined display
  • The interactiveInputs parameter as an alternative to setInputs()
  • The ConsoleAssertionsTrait with assertIsSuccessful(), assertFailed(), assertIsInvalid() and assertResultEquals()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants