summaryrefslogtreecommitdiff
path: root/tests/Unit/ApplicationTest.php
diff options
context:
space:
mode:
authormsquare <msquare@notrademark.de>2017-09-30 11:25:58 +0200
committerGitHub <noreply@github.com>2017-09-30 11:25:58 +0200
commit801c17aa6cef91be988a25a90442be8d2078a70d (patch)
tree7f03157616509fe583b1b0aea6e2d06c53bd9c89 /tests/Unit/ApplicationTest.php
parente1d44e60e35d126dbd05aefa5f897fad16fbfceb (diff)
parent945fcb079a219fa29e8f6ee1afc3f1c0c5c822cb (diff)
Merge pull request #347 from MyIgel/master
Implemented Container, closes #342
Diffstat (limited to 'tests/Unit/ApplicationTest.php')
-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());
+ }
+}