Added Application unit test

This commit is contained in:
Igor Scheller 2017-09-20 00:04:59 +02:00
parent b8d9ab0acb
commit c8d32d23e1
1 changed files with 29 additions and 0 deletions

View File

@ -0,0 +1,29 @@
<?php
namespace Engelsystem\Test\Config;
use Engelsystem\Application;
use Engelsystem\Container\Container;
use PHPUnit\Framework\TestCase;
use Psr\Container\ContainerInterface;
class ApplicationTest extends TestCase
{
/**
* @covers \Engelsystem\Application::__construct
* @covers \Engelsystem\Application::registerBaseBindings
*/
public function testConstructor()
{
$app = new Application();
$this->assertInstanceOf(Container::class, $app);
$this->assertInstanceOf(ContainerInterface::class, $app);
$this->assertSame($app, $app->get('app'));
$this->assertSame($app, $app->get('container'));
$this->assertSame($app, $app->get(Container::class));
$this->assertSame($app, $app->get(Application::class));
$this->assertSame($app, $app->get(ContainerInterface::class));
$this->assertSame($app, Container::getInstance());
}
}