Utilities for testing integrity of services managed by Laminas\ServiceManager

1.0 2021-08-07 12:56 UTC

This package is auto-updated.

Last update: 2024-02-07 18:49:16 UTC


Build Status

Utilities for testing integrity of services managed by Zend\ServiceManager.


Install this library using composer:

$ composer require mtymek/blast-test-utils


Use ServiceIntegrityTestTrait to build test that validates integrity of your service manager configuration. It requires to static methos: getConfig that loads full application config, and getServiceManagerConfigKey providing name of configuration key used to set up ServiceManager.

Example usage for zend-expressive application:


namespace Integration;

use Blast\TestUtils\ServiceIntegrityTestTrait;
use PHPUnit_Framework_TestCase;

class ServiceContainerIntegrityTest extends PHPUnit_Framework_TestCase
    use ServiceIntegrityTestTrait;

    private static function getConfig()
        return include 'config/config.php';

    private static function getServiceManagerConfigKey()
        return 'dependencies';