summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorIgor Scheller <igor.scheller@igorshp.de>2017-09-20 00:04:59 +0200
committerIgor Scheller <igor.scheller@igorshp.de>2017-09-20 00:04:59 +0200
commitc8d32d23e195d53d6d10fdac5003718b10ffbeaa (patch)
tree9fbfe4aca4b3548b2a3550ac20110362429e85ed /tests
parentb8d9ab0acb9c23419e6026d13e9b7dd305f5c919 (diff)
Added Application unit test
Diffstat (limited to 'tests')
-rw-r--r--tests/Unit/ApplicationTest.php29
1 files changed, 29 insertions, 0 deletions
diff --git a/tests/Unit/ApplicationTest.php b/tests/Unit/ApplicationTest.php
new file mode 100644
index 00000000..77429f44
--- /dev/null
+++ b/tests/Unit/ApplicationTest.php
@@ -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());
+ }
+}