diff options
author | Frederic Guillot <fred@kanboard.net> | 2016-12-20 20:06:39 -0500 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2016-12-20 20:06:39 -0500 |
commit | ae708a712a5dd932c01e734f8450b899b1407a70 (patch) | |
tree | 348c01ad849fbeeee0fba74118b4536af4119333 /tests/units/ServiceProvider/FormatterProviderTest.php | |
parent | a957195952e2c93177628ab07936d783da1388c3 (diff) |
Offer the possibility to override internal formatter objects from plugins
Diffstat (limited to 'tests/units/ServiceProvider/FormatterProviderTest.php')
-rw-r--r-- | tests/units/ServiceProvider/FormatterProviderTest.php | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/units/ServiceProvider/FormatterProviderTest.php b/tests/units/ServiceProvider/FormatterProviderTest.php new file mode 100644 index 00000000..7984a12b --- /dev/null +++ b/tests/units/ServiceProvider/FormatterProviderTest.php @@ -0,0 +1,21 @@ +<?php + +use Kanboard\ServiceProvider\FormatterProvider; +use Pimple\Container; + +require_once __DIR__.'/../Base.php'; + +class FormatterProviderTest extends Base +{ + public function testServiceInstance() + { + $container = new Container(); + $serviceProvider = new FormatterProvider($container); + $serviceProvider->register($container); + + $instance1 = $container['userAutoCompleteFormatter']; + $instance2 = $container['userAutoCompleteFormatter']; + + $this->assertNotSame($instance1, $instance2); + } +} |