appContainer = $this->createMock(IAppContainer::class); $this->context = new BootContext( $this->appContainer ); } public function testGetAppContainer(): void { $container = $this->context->getAppContainer(); $this->assertSame($this->appContainer, $container); } public function testGetServerContainer(): void { $serverContainer = $this->createMock(IServerContainer::class); $this->appContainer->method('get') ->with(IServerContainer::class) ->willReturn($serverContainer); $container = $this->context->getServerContainer(); $this->assertSame($serverContainer, $container); } }