Changeset 377
- Timestamp:
- 03/14/07 12:19:46 (1 year ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/main/php/net/stubbles/ipo/session/stubAbstractSession.php
r376 r377 29 29 * @var bool 30 30 */ 31 private $isNew = false;31 private $isNew = false; 32 32 /** 33 33 * the current token of the session, changes on every instantiation … … 35 35 * @var string 36 36 */ 37 private $token = ''; 37 private $token = ''; 38 /** 39 * name of the session 40 * 41 * @var string 42 */ 43 private $sessionName = ''; 38 44 39 45 /** … … 46 52 { 47 53 $this->doConstruct($request, $sessionName); 48 54 $this->sessionName = $sessionName; 49 55 if ($this->hasValue(stubSession::START_TIME) == false || $this->doGetValue(stubSession::FINGERPRINT) != $this->getFingerprint()) { 50 56 if ($this->hasValue(stubSession::START_TIME) == false) { … … 119 125 return $this->getValue(stubSession::START_TIME); 120 126 } 127 128 /** 129 * returns the name of the session 130 * 131 * @return string 132 */ 133 public function getName() 134 { 135 return $this->sessionName; 136 } 121 137 122 138 /** trunk/src/main/php/net/stubbles/ipo/session/stubSession.php
r344 r377 53 53 */ 54 54 public function getID(); 55 56 /** 57 * returns the name of the session 58 * 59 * @return string 60 */ 61 public function getName(); 55 62 56 63 /** trunk/src/test/php/net/stubbles/ipo/session/stubAbstractSessionTestCase.php
r376 r377 16 16 protected function doConstruct(stubRequest $request, $sessionName) 17 17 { 18 if (strlen($sessionName) > 1 ) {18 if (strlen($sessionName) > 1 && 'foo' != $sessionName) { 19 19 $data = explode('|', $sessionName); 20 20 if (strlen($data[0]) > 0) { … … 68 68 public function setUp() 69 69 { 70 $this->session = new stubTestSession(new MockstubRequest(), ' ');70 $this->session = new stubTestSession(new MockstubRequest(), 'foo'); 71 71 } 72 72 … … 76 76 public function testDefaultValues() 77 77 { 78 $this->assertEqual($this->session->getName(), 'foo'); 78 79 $this->assertTrue($this->session->hasValue(stubSession::START_TIME)); 79 80 $startTime = $this->session->getStartTime();
