* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Silex\Provider\Session; use Pimple\Container; use Symfony\Component\HttpKernel\EventListener\TestSessionListener as BaseTestSessionListener; /** * Simulates sessions for testing purpose. * * @author Fabien Potencier */ class TestSessionListener extends BaseTestSessionListener { private $app; public function __construct(Container $app) { $this->app = $app; } protected function getSession() { if (!isset($this->app['session'])) { return; } return $this->app['session']; } }