PHPackages                             zendframework/zend-container-config-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. zendframework/zend-container-config-test

Abandoned → [laminas/laminas-container-config-test](/?search=laminas%2Flaminas-container-config-test)ArchivedLibrary[Testing &amp; Quality](/categories/testing)

zendframework/zend-container-config-test
========================================

Expressive PSR-11 container configuration tests

0.2.2(6y ago)11.4k↓100%3BSD-3-ClausePHPPHP ^7.1

Since Apr 10Pushed 6y ago6 watchersCompare

[ Source](https://github.com/zendframework/zend-container-config-test)[ Packagist](https://packagist.org/packages/zendframework/zend-container-config-test)[ RSS](/packages/zendframework-zend-container-config-test/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (4)Dependencies (6)Versions (5)Used By (3)

zend-container-config-test
==========================

[](#zend-container-config-test)

> ## Repository abandoned 2019-12-31
>
> [](#repository-abandoned-2019-12-31)
>
> This repository has moved to [laminas/laminas-container-config-test](https://github.com/laminas/laminas-container-config-test).

[![Build Status](https://camo.githubusercontent.com/478967569a270018495ae346cc32e4574d50175fdd4885dc7d505fa9fe02a883/68747470733a2f2f7365637572652e7472617669732d63692e6f72672f7a656e646672616d65776f726b2f7a656e642d636f6e7461696e65722d636f6e6669672d746573742e7376673f6272616e63683d6d6173746572)](https://secure.travis-ci.org/zendframework/zend-container-config-test)[![Coverage Status](https://camo.githubusercontent.com/1b5c8e11bfcf0f843ff232b5206dec1b77423f0a59eacc7d122abcc940665957/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f7a656e646672616d65776f726b2f7a656e642d636f6e7461696e65722d636f6e6669672d746573742f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/zendframework/zend-container-config-test?branch=master)

This library provides common tests for PSR-11 containers configured using a subset of [zend-servicemanager](https://github.com/zendframework/zend-servicemanager)[configuration](https://docs.zendframework.com/zend-servicemanager/configuring-the-service-manager/)as [specified by Expressive](https://docs.zendframework.com/zend-expressive/v3/features/container/config/)

It guarantees delivery of the same basic functionality across multiple PSR-11 container implementations, and simplifies switching between them.

Currently we support:

- [Aura.Di](https://github.com/auraphp/Aura.Di) - via [zend-auradi-config](https://github.com/zendframework/zend-auradi-config)
- [Pimple](https://pimple.symfony.com/) - via [zend-pimple-config](https://github.com/zendframework/zend-pimple-config)
- [zend-servicemanager](https://github.com/zendframework/zend-servicemanager)

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

[](#installation)

Run the following to install this library:

```
$ composer require --dev zendframework/zend-container-config-test
```

Using common tests
------------------

[](#using-common-tests)

In your library, you will need to extend the `Zend\ContainerConfigTest\AbstractContainerTest` class within your test suite and implement the method `createContainer`:

```
protected function createContainer(array $config) : ContainerInterface;
```

It should return your PSR-11-compatible container, configured using `$config`.

Then, depending on what functionality you'd like to support, you can add the following traits into your test case:

- `Zend\ContainerConfigTest\AliasTestTrait` - to support `aliases` configuration,
- `Zend\ContainerConfigTest\DelegatorTestTrait` - to support `delegators` configuration,
- `Zend\ContainerConfigTest\FactoryTestTrait` - to support `factories` configuration,
- `Zend\ContainerConfigTest\InvokableTestTrait` - to support `invokables` configuration,
- `Zend\ContainerConfigTest\ServiceTestTrait` - to support `services` configuration,
- `Zend\ContainerConfigTest\SharedTestTrait` - to support `shared` and `shared_by_default` configuration.

To provide an Expressive-compatible container, you should extend the class `Zend\ContainerConfigTest\AbstractExpressiveContainerConfigTest`and implement the method `createContainer`. This class composes the following traits:

- `Zend\ContainerConfigTest\AliasTestTrait`,
- `Zend\ContainerConfigTest\DelegatorTestTrait`,
- `Zend\ContainerConfigTest\FactoryTestTrait`,
- `Zend\ContainerConfigTest\InvokableTestTrait`,
- `Zend\ContainerConfigTest\ServiceTestTrait`.

If you want also plan to support shared services, your test class should compose the `SharedTestTrait` as well:

```
use Zend\ContainerConfigTest\AbstractExpressiveContainerConfigTest;
use Zend\ContainerConfigTest\SharedTestTrait;

class ContainerTest extends AbstractExpressiveContainerConfigTest
{
    use SharedTestTrait;

    protected function createContainer(array $config) : ContainerInterface
    {
        // your container configuration
    }
}
```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 66% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~171 days

Total

4

Last Release

2441d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/296074?v=4)[Zend Framework](/maintainers/zendframework)[@zendframework](https://github.com/zendframework)

---

Top Contributors

[![michalbundyra](https://avatars.githubusercontent.com/u/7423207?v=4)](https://github.com/michalbundyra "michalbundyra (64 commits)")[![weierophinney](https://avatars.githubusercontent.com/u/25943?v=4)](https://github.com/weierophinney "weierophinney (32 commits)")[![shadowhand](https://avatars.githubusercontent.com/u/38203?v=4)](https://github.com/shadowhand "shadowhand (1 commits)")

---

Tags

containerpsr-11testzend-expressivezend-frameworkzfcontainerPSR-11testZendFrameworkzfexpressive

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/zendframework-zend-container-config-test/health.svg)

```
[![Health](https://phpackages.com/badges/zendframework-zend-container-config-test/health.svg)](https://phpackages.com/packages/zendframework-zend-container-config-test)
```

###  Alternatives

[elie29/zend-phpdi-config

PSR-11 PHP-DI autowire container configurator for Laminas, Mezzio, ZF2, ZF3 and Zend Expressive applications

20238.6k7](/packages/elie29-zend-phpdi-config)[ramunasd/symfony-container-mocks

Provides extended Symfony dependency injection container enabling service mocking.

2295.8k2](/packages/ramunasd-symfony-container-mocks)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
