Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
0.00% covered (danger)
0.00%
0 / 15
0.00% covered (danger)
0.00%
0 / 1
CRAP
0.00% covered (danger)
0.00%
0 / 1
IdentifierGeneratorServiceProvider
0.00% covered (danger)
0.00%
0 / 15
0.00% covered (danger)
0.00%
0 / 1
2
0.00% covered (danger)
0.00%
0 / 1
 __invoke
0.00% covered (danger)
0.00%
0 / 15
0.00% covered (danger)
0.00%
0 / 1
2
1<?php
2
3namespace oat\taoQtiTest\models\IdentifierGenerator\ServiceProvider;
4
5use oat\generis\model\data\Ontology;
6use oat\generis\model\DependencyInjection\ContainerServiceProviderInterface;
7use oat\tao\model\IdentifierGenerator\Generator\IdentifierGeneratorProxy;
8use oat\tao\model\TaoOntology;
9use oat\taoQtiTest\models\IdentifierGenerator\Generator\QtiIdentifierGenerator;
10use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
11
12use function Symfony\Component\DependencyInjection\Loader\Configurator\service;
13
14class IdentifierGeneratorServiceProvider implements ContainerServiceProviderInterface
15{
16    public function __invoke(ContainerConfigurator $configurator): void
17    {
18        $services = $configurator->services();
19
20        $services
21            ->set(QtiIdentifierGenerator::class, QtiIdentifierGenerator::class)
22            ->args([
23                service(Ontology::SERVICE_ID),
24            ]);
25
26        $services
27            ->get(IdentifierGeneratorProxy::class)
28            ->call(
29                'addIdentifierGenerator',
30                [
31                    service(QtiIdentifierGenerator::class),
32                    TaoOntology::CLASS_URI_TEST,
33                ]
34            );
35    }
36}