Merge pull request #23378 from R0Wi/bugfix/registration_typo

Fix typo 'shared'
This commit is contained in:
Morris Jobke 2020-10-12 20:04:33 +02:00 committed by GitHub
commit 14af2246f3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 4 deletions

View File

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

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