mirror of
https://git.friendi.ca/friendica/friendica.git
synced 2025-06-12 05:04:32 +02:00
Replace ProvideLoggerEvent with DependencyProvider
This commit is contained in:
parent
f2a26fde4e
commit
1f84917aed
8 changed files with 188 additions and 18 deletions
30
tests/Unit/Addon/AddonManagerTest.php
Normal file
30
tests/Unit/Addon/AddonManagerTest.php
Normal file
|
@ -0,0 +1,30 @@
|
|||
<?php
|
||||
|
||||
// Copyright (C) 2010-2024, the Friendica project
|
||||
// SPDX-FileCopyrightText: 2010-2024 the Friendica project
|
||||
//
|
||||
// SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Friendica\Test\Unit\Addon;
|
||||
|
||||
use Friendica\Addon\AddonManager;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Psr\Log\LoggerInterface;
|
||||
|
||||
class AddonManagerTest extends TestCase
|
||||
{
|
||||
public function testLoadAddon(): void
|
||||
{
|
||||
$logger = $this->createMock(LoggerInterface::class);
|
||||
$logger->expects($this->once())->method('info')->with('Addon "helloaddon" loaded.');
|
||||
|
||||
$manager = new AddonManager(
|
||||
dirname(__DIR__, 2) . '/Util',
|
||||
$logger
|
||||
);
|
||||
|
||||
$manager->bootstrapAddons(['helloaddon' => []]);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue