Let AddonFactory implement AddonLoader

This commit is contained in:
Art4 2025-01-04 10:05:29 +00:00
parent 1067b2a23a
commit 247e9c5fba
2 changed files with 32 additions and 0 deletions

View file

@ -11,11 +11,22 @@ namespace Friendica\Test\Unit\Service\Addon;
use Friendica\Service\Addon\Addon;
use Friendica\Service\Addon\AddonFactory;
use Friendica\Service\Addon\AddonLoader;
use PHPUnit\Framework\TestCase;
use Psr\Log\LoggerInterface;
class AddonFactoryTest extends TestCase
{
public function testAddonFactoryImplementsAddonLoaderInterface(): void
{
$factory = new AddonFactory(
dirname(__DIR__, 3) . '/Util',
$this->createMock(LoggerInterface::class)
);
$this->assertInstanceOf(AddonLoader::class, $factory);
}
public function testLoadAddonsLoadsTheAddon(): void
{
$logger = $this->createMock(LoggerInterface::class);