createStub(IManageConfigValues::class)); $this->assertInstanceOf(LoggerInterface::class, $factory->getLogger()); } public function testGetLoggerReturnsSameObject(): void { $factory = new LoggerManager($this->createStub(IManageConfigValues::class)); $this->assertSame($factory->getLogger(), $factory->getLogger()); } public function testGetLoggerWithDebugDisabledReturnsNullLogger(): void { $config = $this->createStub(IManageConfigValues::class); $config->method('get')->willReturnMap([ ['system', 'debugging', null, false], ]); $factory = new LoggerManager($config); $this->assertInstanceOf(NullLogger::class, $factory->getLogger()); } public function testGetLoggerWithProfilerEnabledReturnsProfilerLogger(): void { $config = $this->createStub(IManageConfigValues::class); $config->method('get')->willReturnMap([ ['system', 'debugging', null, false], ['system', 'profiling', null, true], ]); $factory = new LoggerManager($config); $this->assertInstanceOf(ProfilerLogger::class, $factory->getLogger()); } }