PHPackages                             matthiasnoback/symfony-dependency-injection-test - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Testing &amp; Quality](/categories/testing)
4. /
5. matthiasnoback/symfony-dependency-injection-test

ActiveLibrary[Testing &amp; Quality](/categories/testing)

matthiasnoback/symfony-dependency-injection-test
================================================

Library for testing user classes related to the Symfony Dependency Injection Component

6.3.0(2mo ago)2439.0M↓11.7%49[3 issues](https://github.com/SymfonyTest/SymfonyDependencyInjectionTest/issues)[2 PRs](https://github.com/SymfonyTest/SymfonyDependencyInjectionTest/pulls)20MITPHPPHP ^8.1CI passing

Since Sep 4Pushed 2mo ago14 watchersCompare

[ Source](https://github.com/SymfonyTest/SymfonyDependencyInjectionTest)[ Packagist](https://packagist.org/packages/matthiasnoback/symfony-dependency-injection-test)[ Docs](https://github.com/matthiasnoback/SymfonyDependencyInjectionTest)[ RSS](/packages/matthiasnoback-symfony-dependency-injection-test/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (6)Versions (43)Used By (20)

SymfonyDependencyInjectionTest
==============================

[](#symfonydependencyinjectiontest)

*By Matthias Noback and contributors*

[![Build Status](https://github.com/SymfonyTest/SymfonyDependencyInjectionTest/actions/workflows/ci.yaml/badge.svg)](https://github.com/SymfonyTest/SymfonyDependencyInjectionTest/actions/workflows/ci.yaml)

This library contains several PHPUnit test case classes and many semantic [assertions](#list-of-assertions) which you can use to functionally test your [container extensions](#testing-a-container-extension) (or "bundle extensions") and [compiler passes](#testing-a-compiler-pass). It also provides the tools to functionally test your container extension (or "bundle") configuration by verifying processed values from different types of configuration files.

Besides verifying their correctness, this library will also help you to adopt a TDD approach when developing these classes.

Installation
------------

[](#installation)

Using Composer:

```
composer require --dev matthiasnoback/symfony-dependency-injection-test
```

Usage
-----

[](#usage)

### Testing a container extension

[](#testing-a-container-extension)

To test your own container extension class `MyExtension` create a class and extend from `Matthias\SymfonyDependencyInjectionTest\PhpUnit\AbstractExtensionTestCase`. Then implement the `getContainerExtensions()` method:

```
