Skip to content
Permalink
Browse files

Fixing inherited public properties not being set in SessionHelper.

Adding tests for SessionHelper construction and the setting of inherited properties.  Fixes #94
  • Loading branch information...
markstory committed Sep 17, 2009
1 parent 0065005 commit e0b6b25365b780aaad86c80cb58f374208be35ef
Showing with 12 additions and 2 deletions.
  1. +2 −0 cake/libs/session.php
  2. +10 −2 cake/tests/cases/libs/view/helpers/session.test.php
@@ -151,6 +151,8 @@ function __construct($base = null, $start = true) {
if (strpos($this->host, ':') !== false) {
$this->host = substr($this->host, 0, strpos($this->host, ':'));
}
}
if (isset($_SESSION)) {
if (!class_exists('Security')) {
App::import('Core', 'Security');
}
@@ -62,9 +62,8 @@ class SessionHelperTest extends CakeTestCase {
* @access public
* @return void
*/
function setUp() {
function startTest() {
$this->Session = new SessionHelper();
$this->Session->__start();
$_SESSION = array(
'test' => 'info',
@@ -103,6 +102,15 @@ function tearDown() {
$_SESSION = array();
unset($this->Session);
}
/**
* test construction and initial property settings
*
* @return void
**/
function testConstruct() {
$this->assertFalse(empty($this->Session->sessionTime));
$this->assertFalse(empty($this->Session->security));
}
/**
* testRead method
*

0 comments on commit e0b6b25

Please sign in to comment.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.