summaryrefslogtreecommitdiff
path: root/tests/units/ServiceProvider/ClassProviderTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/units/ServiceProvider/ClassProviderTest.php')
-rw-r--r--tests/units/ServiceProvider/ClassProviderTest.php21
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/units/ServiceProvider/ClassProviderTest.php b/tests/units/ServiceProvider/ClassProviderTest.php
new file mode 100644
index 00000000..f6528918
--- /dev/null
+++ b/tests/units/ServiceProvider/ClassProviderTest.php
@@ -0,0 +1,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);
+ }
+}