Skip to content

docs: clarify dependency injection in PHP tests - #15466

Open
Epic-Drytu wants to merge 1 commit into
nextcloud:masterfrom
Epic-Drytu:docs/15296-document-di-tests
Open

docs: clarify dependency injection in PHP tests#15466
Epic-Drytu wants to merge 1 commit into
nextcloud:masterfrom
Epic-Drytu:docs/15296-document-di-tests

Conversation

@Epic-Drytu

Copy link
Copy Markdown

Description

Fixes #15296

This updates the PHP testing documentation to clarify how dependency injection can be used in tests.

It explains:

  • when dependencies can be mocked or stubbed directly in unit tests
  • when the dependency injection container is useful for integration tests
  • how to access the application container in a test
  • how mocked services can be replaced in the container

Validation

  • sphinx-lint developer_manual/basics/testing.rst passes
  • Full documentation build was not run successfully because this local checkout is a sparse checkout and is missing parts of the documentation tree

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.

Docuemnt access to Dependency injection for Tests

1 participant