Changeset 1655
- Timestamp:
- 06/24/08 10:55:02 (3 months ago)
- Files:
-
- trunk/src/main/php/net/stubbles/websites/cache/stubCachingProcessor.php (modified) (1 diff)
- trunk/src/main/php/net/stubbles/websites/xml/generator/stubSessionXMLGenerator.php (modified) (1 diff)
- trunk/src/test/php/net/stubbles/websites/xml/generator/stubSessionXMLGeneratorTestCase.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/main/php/net/stubbles/websites/cache/stubCachingProcessor.php
r1513 r1655 161 161 if (true === $isCachable) { 162 162 $this->cache->store($this->request, $this->response, $this->processor->getPageName()); 163 $this->setSessionData();164 163 } 164 165 $this->setSessionData(); 165 166 } 166 167 trunk/src/main/php/net/stubbles/websites/xml/generator/stubSessionXMLGenerator.php
r1653 r1655 114 114 } 115 115 116 $xmlStreamWriter->writeElement('id', array(), '$S ID');116 $xmlStreamWriter->writeElement('id', array(), '$SESSION_ID'); 117 117 $xmlStreamWriter->writeElement('name', array(), '$SESSION_NAME'); 118 118 $xmlStreamWriter->writeElement('isNew', array(), (($this->session->isNew() === true) ? ('true') : ('false'))); trunk/src/test/php/net/stubbles/websites/xml/generator/stubSessionXMLGeneratorTestCase.php
r1433 r1655 108 108 public function acceptsCookies() 109 109 { 110 stubRegistry::setConfig(stubSession::NAME_REGISTRY_KEY, 'sessionName');111 110 $this->mockRequest->expects($this->once())->method('acceptsCookies')->will($this->returnValue(true)); 112 $this->mockSession->expects($this->once())->method('getId')->will($this->returnValue('foo'));113 111 $this->mockSession->expects($this->once())->method('isNew')->will($this->returnValue(true)); 114 112 $this->mockSession->expects($this->exactly(2))->method('getValue')->will($this->onConsecutiveCalls('variant_name', 'variant_alias')); … … 118 116 '<session>' . 119 117 '<acceptsCookies>true</acceptsCookies>' . 120 '<id> foo</id>' .121 '<name> sessionName</name>' .118 '<id>$SESSION_ID</id>' . 119 '<name>$SESSION_NAME</name>' . 122 120 '<isNew>true</isNew>' . 123 121 '<variant>' . … … 135 133 public function doesNotAcceptCookies() 136 134 { 137 stubRegistry::removeConfig(stubSession::NAME_REGISTRY_KEY);138 135 $this->mockRequest->expects($this->once())->method('acceptsCookies')->will($this->returnValue(false)); 139 $this->mockSession->expects($this->once())->method('getId')->will($this->returnValue('foo'));140 136 $this->mockSession->expects($this->once())->method('isNew')->will($this->returnValue(false)); 141 137 $this->mockSession->expects($this->exactly(2))->method('getValue')->will($this->returnValue(null)); … … 145 141 '<session>' . 146 142 '<acceptsCookies>false</acceptsCookies>' . 147 '<id> foo</id>' .148 '<name> PHPSESSID</name>' .143 '<id>$SESSION_ID</id>' . 144 '<name>$SESSION_NAME</name>' . 149 145 '<isNew>false</isNew>' . 150 146 '<variant>' .
