Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Symfony Test Service Injector Trait

Symfony Test Service Injector Trait Laravel Package

webignition/symfony-test-service-injector-trait

A PHP trait for Symfony tests that injects services into test classes, cutting boilerplate container setup so you can focus on writing assertions.

Deep Wiki
Context7

A PHP trait that makes private services from a Symfony test container easy to reach in functional and integration tests. Since Symfony exposes most services as private, tests often need extra plumbing to obtain them; this trait supplies a small, consistent API so you can pull a service by ID directly inside your PHPUnit test case.

  • Retrieve private services by container ID with minimal boilerplate
  • Drop-in trait — no base class or inheritance required
  • Designed for Symfony's test environment and test container
  • Keeps test setup focused on behaviour rather than container wiring
  • Composable with existing test cases and other testing utilities
use TestServiceInjectorTrait;

$service = $this->getService(SomeService::class);
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
skyraptor/chatter
edlugz/sasapay
abbasudo/artisan-route
mirvan/ippanel
ignibyte/aic-framework
glavweb/data-schema-bundle
glavweb/datagrid-bundle
tacticmedia/scim-server
uni-method/frame
neika-ai/sdk
adachsoft/php-code-style
pharaonic/laravel-notification-dependencies
beautinow/translug
dev-brainiac/bot-cloaked
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
adachsoft/api-version-bundle
cgv/localized-resource