createMock(LoggerInterface::class); $logger->expects($this->once())->method('info')->with('Addon "helloaddon" loaded.'); $factory = new AddonFactory( dirname(__DIR__, 3) . '/Util', $logger ); $addons = $factory->getAddons(['helloaddon' => []]); $this->assertArrayHasKey('helloaddon', $addons); $this->assertInstanceOf(Addon::class, $addons['helloaddon']); } }