]> source.dussan.org Git - nextcloud-server.git/commitdiff
Fix typo 'shared'
authorRobin Windey <ro.windey@gmail.com>
Mon, 12 Oct 2020 12:19:41 +0000 (14:19 +0200)
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>
Mon, 12 Oct 2020 18:08:36 +0000 (18:08 +0000)
lib/private/AppFramework/Bootstrap/RegistrationContext.php
tests/lib/AppFramework/Bootstrap/RegistrationContextTest.php

index 1ed2dac4c4565b9fdd66e381e5fc21883912bce1..e6512a55e17de3ad16277e91986cdefb7be735d5 100644 (file)
@@ -193,7 +193,7 @@ class RegistrationContext {
                        "appId" => $appId,
                        "name" => $name,
                        "factory" => $factory,
-                       "sharred" => $shared,
+                       "shared" => $shared,
                ];
        }
 
index 8441b6e983d8aa8a66d7b47647ab99608ffba6d6..8e88db6f19a864543837f39efa0d123036b73484 100644 (file)
@@ -83,7 +83,10 @@ class RegistrationContextTest extends TestCase {
                $this->context->delegateEventListenerRegistrations($dispatcher);
        }
 
-       public function testRegisterService(): void {
+       /**
+        * @dataProvider dataProvider_TrueFalse
+        */
+       public function testRegisterService(bool $shared): void {
                $app = $this->createMock(App::class);
                $service = 'abc';
                $factory = function () {
@@ -94,11 +97,11 @@ class RegistrationContextTest extends TestCase {
                        ->willReturn($container);
                $container->expects($this->once())
                        ->method('registerService')
-                       ->with($service, $factory, true);
+                       ->with($service, $factory, $shared);
                $this->logger->expects($this->never())
                        ->method('logException');
 
-               $this->context->for('myapp')->registerService($service, $factory);
+               $this->context->for('myapp')->registerService($service, $factory, $shared);
                $this->context->delegateContainerRegistrations([
                        'myapp' => $app,
                ]);
@@ -159,4 +162,11 @@ class RegistrationContextTest extends TestCase {
                        'myapp' => $app,
                ]);
        }
+
+       public function dataProvider_TrueFalse(){
+               return[
+                       [true],
+                       [false]
+               ];
+       }
 }