23 satır
557 B
PHP
23 satır
557 B
PHP
|
<?php
|
||
|
|
||
|
declare(strict_types=1);
|
||
|
|
||
|
namespace Fbrinker\ExtensionCheck\Tests\Unit;
|
||
|
|
||
|
use Laminas\ServiceManager\ServiceManager;
|
||
|
use PHPUnit\Framework\TestCase;
|
||
|
|
||
|
class ServiceManagerTest extends TestCase
|
||
|
{
|
||
|
public function testServiceManagerConfig(): void
|
||
|
{
|
||
|
$config = require(__DIR__ . '/../../config/serviceManager.php');
|
||
|
$sut = new ServiceManager($config);
|
||
|
|
||
|
foreach ($config['factories'] as $class => $factory) {
|
||
|
$instance = $sut->get($class);
|
||
|
$this->assertInstanceOf($class, $instance);
|
||
|
}
|
||
|
}
|
||
|
}
|