friendica-github/tests/Unit/AppTest.php

28 lines
579 B
PHP
Raw Normal View History

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
declare(strict_types = 1);
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
{
public function testFromDiceReturnsApp(): void
{
2025-01-05 22:36:53 +01:00
$dice = $this->createMock(Container::class);
2024-12-20 13:21:35 +00:00
$dice->expects($this->never())->method('create');
2024-12-19 20:37:56 +00:00
2025-01-05 22:02:38 +01:00
$app = App::fromContainer($dice);
2024-12-19 20:37:56 +00:00
$this->assertInstanceOf(App::class, $app);
}
}