summaryrefslogtreecommitdiff
path: root/tests/units/ServiceProvider/ClassProviderTest.php
blob: f6528918fd2545aae0cb489509fcdd661bdbd328 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<?php

use Kanboard\ServiceProvider\ClassProvider;
use Pimple\Container;

require_once __DIR__.'/../Base.php';

class ModelProviderTest extends Base
{
    public function testServiceInstance()
    {
        $container = new Container();
        $serviceProvider = new ClassProvider($container);
        $serviceProvider->register($container);

        $instance1 = $container['userModel'];
        $instance2 = $container['userModel'];

        $this->assertSame($instance1, $instance2);
    }
}