File "MainTest.php"

Full Path: /home/analogde/www/Diabete/04/tests/backend/Unit/MainTest.php
File size: 1.01 KB
MIME-type: text/x-php
Charset: utf-8

<?php

/*
 * This file is part of the FileGator package.
 *
 * (c) Milos Stojanovic <alcalbg@gmail.com>
 *
 * For the full copyright and license information, please view the LICENSE file
 */

namespace Tests\Unit;

use Filegator\App;
use Filegator\Config\Config;
use Filegator\Container\Container;
use Filegator\Kernel\Request;
use Filegator\Kernel\Response;
use Tests\FakeResponse;
use Tests\FakeStreamedResponse;
use Tests\TestCase;

/**
 * @internal
 */
class MainTest extends TestCase
{
    public function testMainApp()
    {
        $config = new Config();
        $request = new Request();
        $response = new FakeResponse();
        $sresponse = new FakeStreamedResponse();
        $container = new Container();

        $app = new App($config, $request, $response, $sresponse, $container);

        $this->assertEquals($config, $app->resolve(Config::class));
        $this->assertEquals($request, $app->resolve(Request::class));
        $this->assertInstanceOf(Response::class, $app->resolve(Response::class));
    }
}