2024-12-19 20:37:56 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
// Copyright (C) 2010-2024, the Friendica project
|
|
|
|
// SPDX-FileCopyrightText: 2010-2024 the Friendica project
|
|
|
|
//
|
|
|
|
// SPDX-License-Identifier: AGPL-3.0-or-later
|
|
|
|
|
2025-01-05 22:49:56 +01:00
|
|
|
declare(strict_types=1);
|
2024-12-19 20:37:56 +00:00
|
|
|
|
|
|
|
namespace Friendica\Test\Unit;
|
|
|
|
|
|
|
|
use Friendica\App;
|
2025-01-05 22:36:53 +01:00
|
|
|
use Friendica\Core\Container;
|
2024-12-19 20:37:56 +00:00
|
|
|
use PHPUnit\Framework\TestCase;
|
|
|
|
|
|
|
|
class AppTest extends TestCase
|
|
|
|
{
|
2025-01-05 22:48:24 +01:00
|
|
|
public function testFromContainerReturnsApp(): void
|
2024-12-19 20:37:56 +00:00
|
|
|
{
|
2025-01-05 22:39:09 +01:00
|
|
|
$container = $this->createMock(Container::class);
|
|
|
|
$container->expects($this->never())->method('create');
|
2024-12-19 20:37:56 +00:00
|
|
|
|
2025-01-05 22:39:09 +01:00
|
|
|
$app = App::fromContainer($container);
|
2024-12-19 20:37:56 +00:00
|
|
|
|
|
|
|
$this->assertInstanceOf(App::class, $app);
|
|
|
|
}
|
|
|
|
}
|