summaryrefslogtreecommitdiff
path: root/tests/Unit/Renderer/Twig/Extensions/SessionTest.php
diff options
context:
space:
mode:
authorIgor Scheller <igor.scheller@igorshp.de>2018-09-08 12:48:08 +0200
committerIgor Scheller <igor.scheller@igorshp.de>2018-09-09 12:11:12 +0200
commit222c9fed7d4ca2b3b44c05907fbb7080c1efd342 (patch)
tree62b1bfa9233000985331b9dea703d51dc24515a2 /tests/Unit/Renderer/Twig/Extensions/SessionTest.php
parent2d6bca1357faff28bc1f86a56b432cc463ff7574 (diff)
parent8257864829ffdfb410f05e0dd0a9c781f48b741a (diff)
Merge remote-tracking branch 'MyIgel/templating'
Diffstat (limited to 'tests/Unit/Renderer/Twig/Extensions/SessionTest.php')
-rw-r--r--tests/Unit/Renderer/Twig/Extensions/SessionTest.php25
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/Unit/Renderer/Twig/Extensions/SessionTest.php b/tests/Unit/Renderer/Twig/Extensions/SessionTest.php
new file mode 100644
index 00000000..7ce4dc3a
--- /dev/null
+++ b/tests/Unit/Renderer/Twig/Extensions/SessionTest.php
@@ -0,0 +1,25 @@
+<?php
+
+namespace Engelsystem\Test\Unit\Renderer\Twig\Extensions;
+
+use Engelsystem\Renderer\Twig\Extensions\Session;
+use PHPUnit\Framework\MockObject\MockObject;
+use Symfony\Component\HttpFoundation\Session\Session as SymfonySession;
+
+class SessionTest extends ExtensionTest
+{
+ /**
+ * @covers \Engelsystem\Renderer\Twig\Extensions\Session::__construct
+ * @covers \Engelsystem\Renderer\Twig\Extensions\Session::getFunctions
+ */
+ public function testGetGlobals()
+ {
+ /** @var SymfonySession|MockObject $session */
+ $session = $this->createMock(SymfonySession::class);
+
+ $extension = new Session($session);
+ $functions = $extension->getFunctions();
+
+ $this->assertExtensionExists('session_get', [$session, 'get'], $functions);
+ }
+}