diff options
author | Igor Scheller <igor.scheller@igorshp.de> | 2018-08-26 12:23:47 +0200 |
---|---|---|
committer | Igor Scheller <igor.scheller@igorshp.de> | 2018-08-29 23:46:31 +0200 |
commit | df6360044b5c2396b2bee0dfa9e8d744bfa424d5 (patch) | |
tree | 177b81f1feca7b1b77b4cd20d006bc1820baba12 /tests/Unit/Renderer/Twig/Extensions/SessionTest.php | |
parent | bb3d16d273bb3e4552e4869dd22cb2c2d81f5387 (diff) |
Added Twig template functions
Diffstat (limited to 'tests/Unit/Renderer/Twig/Extensions/SessionTest.php')
-rw-r--r-- | tests/Unit/Renderer/Twig/Extensions/SessionTest.php | 25 |
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); + } +} |