mirror of
https://github.com/nextcloud/server.git
synced 2026-11-11 04:17:26 +01:00
This is clearer, safer and better typed. Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
39 lines
894 B
PHP
39 lines
894 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
/**
|
|
* SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors
|
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
|
*/
|
|
|
|
namespace lib\AppFramework\Bootstrap;
|
|
|
|
use OC\AppFramework\Bootstrap\BootContext;
|
|
use OC\Server;
|
|
use Psr\Container\ContainerInterface;
|
|
use Test\TestCase;
|
|
|
|
class BootContextTest extends TestCase {
|
|
private BootContext $context;
|
|
|
|
#[\Override]
|
|
protected function setUp(): void {
|
|
parent::setUp();
|
|
|
|
$this->context = $this->createInstanceWithMocks(BootContext::class);
|
|
}
|
|
|
|
public function testGetAppContainer(): void {
|
|
$container = $this->context->getAppContainer();
|
|
|
|
$this->assertSame($this->getAutoMock(ContainerInterface::class), $container);
|
|
}
|
|
|
|
public function testGetServerContainer(): void {
|
|
$container = $this->context->getServerContainer();
|
|
|
|
$this->assertSame($this->getAutoMock(Server::class), $container);
|
|
}
|
|
}
|