$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 () {
->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,
]);
'myapp' => $app,
]);
}
+
+ public function dataProvider_TrueFalse(){
+ return[
+ [true],
+ [false]
+ ];
+ }
}