You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
938 B
PHTML
30 lines
938 B
PHTML
7 years ago
|
<?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());
|
||
|
}
|
||
|
}
|