Skip to content
This repository was archived by the owner on Feb 6, 2020. It is now read-only.

Commit b4e7bf5

Browse files
committed
Assert that zend-servicemanager is a PSR-11 container
1 parent 939f297 commit b4e7bf5

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
},
1616
"require": {
1717
"php": "^5.6 || ^7.0",
18-
"container-interop/container-interop": "~1.0",
18+
"container-interop/container-interop": "^1.2",
19+
"psr/container": "^1.0",
1920
"zendframework/zend-stdlib": "^3.1"
2021
},
2122
"require-dev": {

test/ServiceManagerTest.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
use DateTime;
1111
use PHPUnit\Framework\TestCase;
12+
use Psr\Container\ContainerInterface;
1213
use stdClass;
1314
use Zend\ServiceManager\Factory\FactoryInterface;
1415
use Zend\ServiceManager\Factory\InvokableFactory;
@@ -29,6 +30,12 @@ public function createContainer(array $config = [])
2930
return $this->creationContext;
3031
}
3132

33+
public function testServiceManagerIsAPsr11Container()
34+
{
35+
$container = $this->createContainer();
36+
$this->assertInstanceOf(ContainerInterface::class, $container);
37+
}
38+
3239
public function testConfigurationCanBeMerged()
3340
{
3441
$serviceManager = new SimpleServiceManager([

0 commit comments

Comments
 (0)