summaryrefslogtreecommitdiff
path: root/tests/Unit/Renderer/Twig/Extensions/SessionTest.php
diff options
context:
space:
mode:
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);
+ }
+}