Fix typo 'shared'

pull/23378/head
Robin Windey 6 years ago
parent b6364cc483
commit 6a1f8fb3be
No known key found for this signature in database
GPG Key ID: 1BC8A1EDBD02E06B
  1. 2
      lib/private/AppFramework/Bootstrap/RegistrationContext.php
  2. 16
      tests/lib/AppFramework/Bootstrap/RegistrationContextTest.php

@ -203,7 +203,7 @@ class RegistrationContext {
"appId" => $appId,
"name" => $name,
"factory" => $factory,
"sharred" => $shared,
"shared" => $shared,
];
}

@ -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]
];
}
}

Loading…
Cancel
Save