Permalink
Browse files

Revert "Adding setSavePath and getSavePath to SessionStorage to contr…

…ol global setting of session_save_path()."

This reverts commit 2381bd3.
  • Loading branch information...
1 parent 2381bd3 commit 85a7f7daec98e8feb76cccb7b349b4cb99344251 @zburnham committed Dec 11, 2012
Showing with 0 additions and 52 deletions.
  1. +0 −35 library/Zend/Session/Storage/SessionStorage.php
  2. +0 −17 tests/ZendTest/Session/SessionStorageTest.php
@@ -24,13 +24,6 @@
*/
class SessionStorage extends ArrayStorage
{
- /**
- * Session save path.
- *
- * @var string
- */
- protected $savePath;
-
/**
* Constructor
*
@@ -110,32 +103,4 @@ public function isImmutable()
{
return (isset($this['_IMMUTABLE']) && $this['_IMMUTABLE']);
}
-
- /**
- * Returns the currently set session_save_path() value. Sets the class
- * property if the class property is stale.
- *
- * @return string
- */
- public function getSavePath()
- {
- $savePath = session_save_path();
- if ($savePath != $this->savePath) {
- $this->setSavePath($savePath);
- }
- return $this->savePath;
- }
-
- /**
- * Sets the session_save_path() value and the class property.
- *
- * @param string $savePath
- * @return \Zend\Session\Storage\SessionStorage
- */
- public function setSavePath($savePath)
- {
- session_save_path($savePath);
- $this->savePath = $savePath;
- return $this;
- }
}
@@ -95,21 +95,4 @@ public function testMarkingOneSessionObjectImmutableShouldMarkOtherInstancesImmu
$this->storage->markImmutable();
$this->assertTrue($storage->isImmutable(), var_export($_SESSION, 1));
}
-
- public function testSetSavePathSetsSessionSavePath()
- {
- $savePath = '/this/is/a/path';
- $this->storage->setSavePath($savePath);
- $this->assertEquals($savePath, session_save_path());
- }
-
- public function testGetSavePathGivesAccuratePath()
- {
- $savePath = session_save_path();
- $testSavePath = $this->storage->getSavePath();
- $this->assertEquals($savePath, $testSavePath);
- $savePath = '/this/is/a/path';
- session_save_path($savePath);
- $this->assertEquals($savePath, $this->storage->getSavePath());
- }
}

0 comments on commit 85a7f7d

Please sign in to comment.