Skip to content

Instantly share code, notes, and snippets.

@cosmicdreams
Last active December 13, 2015 16:59
Show Gist options
  • Save cosmicdreams/4944247 to your computer and use it in GitHub Desktop.
Save cosmicdreams/4944247 to your computer and use it in GitHub Desktop.
Here ya go Daniel
<?php
/**
* @file
* Definition of Drupal\system\Tests\Session\SessionSymfony2Test.
*/
namespace Drupal\system\Tests\Session;
use Drupal\simpletest\DrupalUnitTestBase;
class SessionSymfony2Test extends DrupalUnitTestBase {
public static function getInfo() {
return array(
'name' => 'Symfony2 Session tests',
'description' => 'Test our use of Symfony2 Sesion objects',
'group' => 'Session'
);
}
/**
* Tests the new session API and handling
*/
function testDICSession() {
$session = drupal_container()->get('session');
$this->verbose($session);
// Does the session exist?
$this->assertTrue($session, "The Symfony2 Session exists.");
// Can I log in?
$session->start();
$this->assertTrue
// Can I log out?
// Can I save data in a session?
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment