getFunctions(); $this->assertExtensionExists('session_get', [$session, 'get'], $functions); $this->assertExtensionExists('session_set', [$session, 'set'], $functions); $this->assertExtensionExists('session_pop', [$extension, 'sessionPop'], $functions); } /** * @covers \Engelsystem\Renderer\Twig\Extensions\Session::sessionPop */ public function testSessionPop(): void { $session = new SymfonySession(new MockArraySessionStorage()); $session->set('test', 'value'); $extension = new Session($session); $result = $extension->sessionPop('test'); $this->assertEquals('value', $result); $this->assertFalse($session->has('test')); $result = $extension->sessionPop('foo', 'default value'); $this->assertEquals('default value', $result); } }